Bug 7362: Notify applyState synchronously
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / behaviors / AbstractLeader.java
index 4fae48e1aa42143d0867338d1ca3a3536ea9b26f..1b3abffbb0a09031eafcc55fd8a9cc3ac070a2d9 100644 (file)
@@ -323,14 +323,9 @@ public abstract class AbstractLeader extends AbstractRaftActorBehavior {
             int replicatedCount = replicatedLogEntry.isPersistencePending() ? 0 : 1;
 
             if (replicatedCount == 0) {
-                // We don't commit and apply a log entry until we've gotten the ack from our local persistence. Ideally
-                // we should be able to update the commit index if we get a consensus amongst the followers
-                // w/o the local persistence ack however this can cause timing issues with snapshot capture
-                // which may lead to an entry that is neither in the serialized snapshot state nor in the snapshot's
-                // unapplied entries. This can happen if the lastAppliedIndex is updated but the corresponding
-                // ApplyState message is still pending in the message queue and thus the corresponding log entry hasn't
-                // actually been applied to the state yet. This would be alleviated by eliminating the ApplyState
-                // message in lieu of synchronously updating lastAppliedIndex and applying to state.
+                // We don't commit and apply a log entry until we've gotten the ack from our local persistence,
+                // even though there *shouldn't* be any issue with updating the commit index if we get a consensus
+                // amongst the followers w/o the local persistence ack.
                 break;
             }