ibessonov commented on code in PR #2066:
URL: https://github.com/apache/ignite-3/pull/2066#discussion_r1191994722


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java:
##########
@@ -828,6 +818,10 @@ public CompletableFuture<Void> onJoinReady() {
         }
     }
 
+    public CompletableFuture<UpdateDistributedConfigurationAction> 
clusterConfigurationToUpdate() {
+        return updateDistributedConfigurationActionFuture;

Review Comment:
   We should complete this future on the node stop. What if somebody's waiting 
and we stop the node too early?



##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/UpdateDistributedConfigurationAction.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.cluster.management;
+
+import java.util.concurrent.CompletableFuture;
+import org.jetbrains.annotations.Nullable;
+
+public class UpdateDistributedConfigurationAction implements Action<String, 
CompletableFuture<Void>> {
+
+    private final String cfgToUpdate;

Review Comment:
   I know this will sound picky, but I don't think that it's correct to name 
this thing "configuration to update", because "object to update" usually means 
that the object itself will be updated, not that it contains the update for 
some other object.
   Could it simple be "configurationString" or "configuration"? I'd be less 
confused in that case



##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/Action.java:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.cluster.management;
+
+public interface Action<A1, A2> {

Review Comment:
   I would love to see a Javadoc. Looks like some primitive version of a state 
machine, I wonder what it's for.



-- 
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]

Reply via email to