Flaugh24 commented on code in PR #1569:
URL: https://github.com/apache/ignite-3/pull/1569#discussion_r1123326690
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java:
##########
@@ -366,6 +390,36 @@ private void onElectedAsLeader(long term) {
LOG.warn("Error when executing onLeaderElected
callback", e);
}
});
+
+ raftServiceAfterJoin().thenCompose(service ->
service.readClusterState()
+ .thenCompose(state -> {
+ if (state == null) {
+ LOG.info("No CMG state found in the Raft storage");
+ return completedFuture(null);
+ } else if (state.restAuthToApply() == null) {
+ LOG.info("No REST auth configuration found in the Raft
storage");
+ return completedFuture(null);
+ } else {
+ LOG.info("REST auth configuration found in the Raft
storage, going to apply it");
+ return
distributedConfigurationUpdater.updateRestAuthConfiguration(toRestAuthConfig(state.restAuthToApply()))
+ .thenCompose(unused -> {
+ ClusterState clusterState =
ClusterState.clusterState(
Review Comment:
done
--
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]