tkalkirill commented on code in PR #4410:
URL: https://github.com/apache/ignite-3/pull/4410#discussion_r1764855560


##########
modules/system-disaster-recovery/src/main/java/org/apache/ignite/internal/disaster/system/SystemDisasterRecoveryStorage.java:
##########
@@ -53,7 +53,10 @@ public void removeResetClusterMessage() {
         vault.remove(RESET_CLUSTER_MESSAGE_VAULT_KEY);
     }
 
-    /** Reads cluster state. */
+    /**
+     * Reads cluster state. This is used for cases when it may be needed to 
read it during node startup (and the usual CMG state storage

Review Comment:
   Let's specify in the documentation that we read from the vault and what 
`null` means.



##########
modules/cluster-management/src/testFixtures/java/org/apache/ignite/internal/cluster/management/raft/TestClusterStateStorage.java:
##########
@@ -59,6 +66,24 @@ public class TestClusterStateStorage implements 
ClusterStateStorage {
     /** Prevents double stopping of the component. */
     private final AtomicBoolean stopGuard = new AtomicBoolean();
 
+    /**
+     * Returns a {@link TestClusterStateStorage} containing cluster state.
+     */
+    public static TestClusterStateStorage initializedClusterStateStorage() {
+        TestClusterStateStorage storage = new TestClusterStateStorage();
+
+        new ClusterStateStorageManager(storage).putClusterState(

Review Comment:
   Are you creating a manager just to correctly put the value by key?
   It's not obvious, maybe leave the documentation? Or just put by key without 
creating a manager?



##########
modules/cluster-management/src/testFixtures/java/org/apache/ignite/internal/cluster/management/raft/TestClusterStateStorage.java:
##########
@@ -50,6 +55,8 @@
 public class TestClusterStateStorage implements ClusterStateStorage {
     private static final String SNAPSHOT_FILE = "snapshot.bin";
 
+    private static final CmgMessagesFactory cmgMessagesFactory = new 
CmgMessagesFactory();

Review Comment:
   Since the field is static, maybe it would be more correct to name it 
**CMG_MESSAGES_FACTORY**?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to