psalagnac commented on code in PR #3524:
URL: https://github.com/apache/solr/pull/3524#discussion_r2314099274
##########
solr/core/src/java/org/apache/solr/cloud/ZkController.java:
##########
@@ -390,6 +382,26 @@ public ZkController(
if (cc != null) cc.securityNodeChanged();
});
+ // Now that zkStateReader is available, read the overseer enabled setting
+ // When overseerEnabled is false, both distributed features should be
enabled
+ Object clusterProperty =
zkStateReader.getClusterProperty(ZkStateReader.OVERSEER_ENABLED, null);
Review Comment:
Can't we store the property directly as a boolean instead of a string?
##########
solr/core/src/java/org/apache/solr/cloud/ZkController.java:
##########
@@ -390,6 +382,26 @@ public ZkController(
if (cc != null) cc.securityNodeChanged();
});
+ // Now that zkStateReader is available, read the overseer enabled setting
+ // When overseerEnabled is false, both distributed features should be
enabled
+ Object clusterProperty =
zkStateReader.getClusterProperty(ZkStateReader.OVERSEER_ENABLED, null);
+ boolean overseerEnabled;
+ if (clusterProperty != null) {
+ overseerEnabled = "true".equals(String.valueOf(clusterProperty));
+ } else {
+ overseerEnabled =
EnvUtils.getPropertyAsBool("solr.cloud.overseer.enabled", true);
+ }
+ boolean useDistributedUpdates = !overseerEnabled;
Review Comment:
We should not have two different flags anymore.
(I would fully remove them and use `!overseerEnabled` instead.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]