Skip to content

IGNITE-28731 Create cluster auto activation plugin - #355

Open
DenisPolo wants to merge 3 commits into
apache:masterfrom
DenisPolo:ignite-28731
Open

IGNITE-28731 Create cluster auto activation plugin#355
DenisPolo wants to merge 3 commits into
apache:masterfrom
DenisPolo:ignite-28731

Conversation

@DenisPolo

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread .gigaide/gigaide.properties Outdated
Comment thread modules/auto-activation-ext/README.md
Comment on lines +114 to +137
if (cluster.state() == ClusterState.ACTIVE) {
if (logger.isInfoEnabled())
logger.info("Auto activation skipped - cluster already activated");

return;
}

if (cluster.currentBaselineTopology() != null) {
if (logger.isInfoEnabled())
logger.info("Auto activation skipped - baseline is not empty");

return;
}

if (condition.apply(cluster.nodes())) {
if (logger.isInfoEnabled())
logger.info("Auto activation plugin set cluster state ACTIVE - activation condition meet");

cluster.state(ClusterState.ACTIVE);
}
else {
if (logger.isInfoEnabled())
logger.info("Auto activation skipped - activation condition not meet");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should ACTIVE_READ_ONLY be treated as already activated here? With the current check the plugin skips only ACTIVE and later calls cluster.state(ACTIVE), so a read-only cluster can be promoted to read-write mode by auto-activation. I think auto-activation should only activate INACTIVE clusters and leave ACTIVE_READ_ONLY unchanged.

Also add test for ACTIVE_READ_ONLY nodes

return;
}

if (condition.apply(cluster.nodes())) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this condition be evaluated only against server nodes? cluster.nodes() includes client nodes, so a client node with a matching consistentId or attribute can satisfy the activation condition and trigger cluster activation before the required server topology is actually present

WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add test for scenario with client nodes

@@ -0,0 +1,113 @@
<beans xmlns="http://www.springframework.org/schema/beans"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These XML test configs duplicate most of the Ignite configuration. Can we move the common storage/cache/discovery/connector settings to a shared parent bean or common XML file, and keep only node-specific values here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants