sanpwc commented on code in PR #1369:
URL: https://github.com/apache/ignite-3/pull/1369#discussion_r1033509805
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java:
##########
@@ -82,6 +85,9 @@ public class ReplicaManager implements IgniteComponent {
/** Replicas. */
private final ConcurrentHashMap<ReplicationGroupId, Replica> replicas =
new ConcurrentHashMap<>();
+ /** Replicas which was requested but have not started yet. */
Review Comment:
that were
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java:
##########
@@ -82,6 +85,9 @@ public class ReplicaManager implements IgniteComponent {
/** Replicas. */
private final ConcurrentHashMap<ReplicationGroupId, Replica> replicas =
new ConcurrentHashMap<>();
+ /** Replicas which was requested but have not started yet. */
+ private final Map<ReplicationGroupId, CompletableFuture<Void>>
pendingReplicas = new ConcurrentHashMap<>();
Review Comment:
Why do we need two maps replicas and pendingReplicas, seems that they both
about the same?
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/message/AwaitReplicaRequest.java:
##########
@@ -0,0 +1,32 @@
+/*
+ * 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.replicator.message;
+
+import org.apache.ignite.internal.replicator.Replica;
+import org.apache.ignite.internal.replicator.ReplicaManager;
+import org.apache.ignite.internal.replicator.ReplicaService;
+import
org.apache.ignite.internal.replicator.exception.ReplicaUnavailableException;
+import org.apache.ignite.network.annotations.Transferable;
+
+/**
+ * This request is sent when some request fails in {@link ReplicaService} with
an {@link ReplicaUnavailableException}
Review Comment:
Please rephrase.
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/message/AwaitReplicaResponse.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * 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.replicator.message;
+
+import org.apache.ignite.network.annotations.Transferable;
+
+/**
+ * Await replica response.
+ */
+@Transferable(ReplicaMessageGroup.AWAIT_REPLICA_RESPONSE)
+public interface AwaitReplicaResponse extends ReplicaResponse {
Review Comment:
What kind of Object result() do you expect?
--
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]