rpuch commented on code in PR #795:
URL: https://github.com/apache/ignite-3/pull/795#discussion_r879552277
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/LocalStateStorage.java:
##########
@@ -30,7 +30,26 @@
* <p>This state has nothing to do with local Raft state and is only used on
node startup, when Raft groups have not yet been started.
*/
class LocalStateStorage {
- private static final ByteArray CMG_NODES_VAULT_KEY =
ByteArray.fromString("cmg_nodes");
+ private static final ByteArray CMG_STATE_VAULT_KEY =
ByteArray.fromString("cmg_state");
+
+ static class LocalState implements Serializable {
+ private final Set<String> cmgNodeNames;
+
+ private final ClusterTag clusterTag;
+
+ LocalState(Set<String> cmgNodeNames, ClusterTag clusterTag) {
+ this.cmgNodeNames = cmgNodeNames;
Review Comment:
They defend us from messing something up, and we can mess it up in internal
code as well. As for avoiding defensive copies, it makes sense in 'hot' code,
but in code which is executed really rarely (like join/validation code), I'd
prefer to be a bit over-cautious.
--
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]