Skip to content

Commit

Permalink
IGNITE-23982 Comment out asserts on primary elected/expired in Replic…
Browse files Browse the repository at this point in the history
…aStateManager (#4893)
  • Loading branch information
JAkutenshi authored Dec 13, 2024
1 parent f5c0169 commit b72cbcc
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,9 @@ private void registerFailoverCallback(ReplicationGroupId replicationGroupId) {
return;
}

assert replicaFuture.isDone() : "Illegal state: replica future exists and elected as primary, but the future isn't completed"
+ " [replicationGroupId=" + replicaFuture + "].";
// TODO: https://issues.apache.org/jira/browse/IGNITE-23981
// assert replicaFuture.isDone() : "Illegal state: replica future exists and elected as primary, but the future isn't completed"
// + " [replicationGroupId=" + replicaFuture + "].";

replicaFuture.thenCompose(inBusyLock(busyLock, () -> (Function<Replica, CompletableFuture<Void>>) electedPrimaryReplica -> {
onLeaderElectedFailoverCallback = (leaderNode, term) -> changePeersAndLearnersAsyncIfPendingExists(
Expand Down Expand Up @@ -1398,8 +1399,9 @@ private void unregisterFailoverCallback(PrimaryReplicaEventParameters parameters
return;
}

assert replicaFuture.isDone() : "Illegal state: replica future exists and was elected as primary, but the future isn't"
+ " completed [replicationGroupId=" + replicaFuture + "].";
// TODO: https://issues.apache.org/jira/browse/IGNITE-23981
// assert replicaFuture.isDone() : "Illegal state: replica future exists and was elected as primary, but the future isn't"
// + " completed [replicationGroupId=" + replicaFuture + "].";

replicaFuture.thenAccept(inBusyLock(busyLock, () -> (Consumer<Replica>) expiredPrimaryReplica -> expiredPrimaryReplica
.raftClient()
Expand Down

0 comments on commit b72cbcc

Please sign in to comment.