vldpyatkov commented on code in PR #3422:
URL: https://github.com/apache/ignite-3/pull/3422#discussion_r1562409318


##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/Replica.java:
##########
@@ -141,6 +152,34 @@ public CompletableFuture<ReplicaResult> 
processRequest(ReplicaRequest request, S
                 request.groupId(),
                 replicaGrpId);
 
+        if (!waitForActualStateFuture.isDone() && request instanceof 
PrimaryReplicaRequest) {
+            var targetPrimaryReq = (PrimaryReplicaRequest) request;
+
+            if (request instanceof EmptyPrimaryReplicaRequest) {
+                return 
waitForActualState(FastTimestamps.coarseCurrentTimeMillis() + 10_000)
+                        .thenComposeAsync(
+                                v -> 
sendPrimaryReplicaChangeToReplicationGroup(targetPrimaryReq.enlistmentConsistencyToken()),
+                                executor
+                        )
+                        .thenComposeAsync(
+                                unused -> completedFuture(new 
ReplicaResult(null, null)),
+                                executor
+                        );
+            }
+
+            return placementDriver.addSubgroups(

Review Comment:
   I do not see a way to do this right now.



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