You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/01/26 22:20:48 UTC
[GitHub] [cassandra] frankgh commented on a change in pull request #1376: CASSANDRA-17226: Consistency Level Considered Connectivity Checker
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org