denis-chudov commented on code in PR #4329:
URL: https://github.com/apache/ignite-3/pull/4329#discussion_r1755009189
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java:
##########
@@ -548,21 +552,39 @@ private void
onPlacementDriverMessageReceived(NetworkMessage msg0, ClusterNode s
* @param redirectNodeId Node consistent id to redirect.
*/
private void stopLeaseProlongation(ReplicationGroupId groupId, @Nullable
String redirectNodeId) {
- LOG.info("The replica does not meet the requirements for the
leaseholder [groupId={}, redirectNodeId={}]", groupId, redirectNodeId);
+ stopLeaseProlongation(groupId, redirectNodeId, false);
+ }
+
+ /**
+ * Sends stop lease prolongation message to all participants of placement
driver group.
+ *
+ * @param groupId Replication group id.
+ * @param redirectNodeId Node consistent id to redirect.
+ * @param waitForPrimary Whether wait for primary to appear.
+ * @return Future that is completed when {@link
StopLeaseProlongationMessage} is sent.
+ */
+ private CompletableFuture<Void> stopLeaseProlongation(
+ ReplicationGroupId groupId,
+ @Nullable String redirectNodeId,
+ boolean waitForPrimary
+ ) {
+ CompletableFuture<ReplicaMeta> primaryReplicaFuture = waitForPrimary
+ ? placementDriver.awaitPrimaryReplica(groupId,
clockService.now(), 120, TimeUnit.SECONDS)
Review Comment:
done
--
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]