Lalant commented on code in PR #7379:
URL: https://github.com/apache/ignite-3/pull/7379#discussion_r2698007105
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/PlacementDriverMessageProcessor.java:
##########
@@ -209,6 +205,23 @@ private CompletableFuture<LeaseGrantedMessageResponse>
processLeaseGrantedMessag
);
}
+ private @NotNull CompletableFuture<Void>
getWaitForStateAndSendPrimaryReplicaChanged(LeaseGrantedMessage msg) {
+ return waitForActualState(msg.leaseStartTime(),
msg.leaseExpirationTime().getPhysical()).thenCompose(
+ v ->
sendPrimaryReplicaChangeToReplicationGroup(msg.leaseStartTime().longValue(),
+ localNode.id(), localNode.name()))
+ .whenComplete((v, e) -> {
+ if (e != null) {
+ LOG.warn("Could not send primary replica changed "
+ + "[leaseStartTime={},
primaryReplicaNodeId={}, primaryReplicaNodeName ={}].", e,
+ msg.leaseStartTime().longValue(),
localNode.id(), localNode.name());
+ } else {
+ LOG.info("Primary Replica changed was sent"
+ + "[leaseStartTime={},
primaryReplicaNodeId={}, primaryReplicaNodeName ={}].",
Review Comment:
Done
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/PlacementDriverMessageProcessor.java:
##########
@@ -259,18 +272,137 @@ private CompletableFuture<LeaseGrantedMessageResponse>
proposeLeaseRedirect(Inte
* @return Future that is completed when local storage catches up the
index that is actual for leader on the moment of request.
*/
private CompletableFuture<Void> waitForActualState(HybridTimestamp
startTime, long expirationTime) {
- LOG.info("Waiting for actual storage state, group=" + groupId);
+ LOG.info("Waiting for actual storage state [groupId={},
expirationTime={}, timeoutMs={}, leaseStartTime={}]",
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]