frankgh commented on a change in pull request #1376:
URL: https://github.com/apache/cassandra/pull/1376#discussion_r793099116
##########
File path: src/java/org/apache/cassandra/config/DatabaseDescriptor.java
##########
@@ -1042,6 +1059,52 @@ public static void applySslContext()
}
}
+ public static void applyStartupConnectivityChecker()
+ {
+ applyStartupConnectivityChecker(conf);
+ }
+
+ @VisibleForTesting
+ static void applyStartupConnectivityChecker(Config conf)
+ {
+ StartupConnectivityChecker startupConnectivityChecker;
+
+ /* Startup cluster connectivity checker backend, implementing
StartupClusterConnectivityChecker */
+ if (conf.startup_connectivity_checker != null)
+ {
+ // A ConfigurationException is thrown if the class is not found
+ startupConnectivityChecker =
FBUtilities.newStartupConnectivityChecker(conf.startup_connectivity_checker);
+ }
+ else
+ {
+ startupConnectivityChecker = new
StrictStartupConnectivityChecker();
+ }
+
+ // the configuration option block_for_peers_in_remote_dcs is only
guaranteed
+ // to work with StrictStartupClusterConnectivityChecker, so log a
message if
+ // some other startup cluster connectivity checker is in use and the
non-default
+ // value is detected
+ if (!(startupConnectivityChecker instanceof
StrictStartupConnectivityChecker)
Review comment:
This is warning the user that the properties specific for the
`StrictStartupConnectivityChecker` are not unintentionally being configured
with a different `startupConnectivityChecker`. So it's basically saying "hey,
you changed the default value of this configuration property that is intended
for a different startup checker than the one you are using". It's a pattern I
saw somewhere else in this codebase, I will try to find where exactly that is
being used.
--
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]