You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An entity with a non-latest state (there is a Replica or ReplicationSucceeded in its mailbox) runs its command handler and will send a Replicate message to the leader.
This situation is possible and expected.
The leader cannot reply to the entity with a ReplicationFailed message in some cases.
The leader should reply to the entity with a ReplicationFaield message against a Replicate message sent based on a non-latest state.
Leader can reply with a ReplicationFaield message if LogEntry for the previous entity's replicate message is uncommitted.
Leader cannot reply with a ReplicationFaield message if LogEntry for the previous entity's replicate message is committed, but not applied to the entity. There is a subtle timing in which the entity sends a Replicate based on a non-latest state after the leader has sent the LogEntry to the entity.
Possible Solution
An Entity sends a Replicate message containing its lastAppliedLogEntryIndex. A leader will reply with ReplicaionFaield if Leader's Raft log (ReplicatedLog) contains an entry that satisfies the all of the following conditions:
The entry is for the entity (LogEntry.event.entityId is equal to Replicate.entityId)
The index of the entry is greater than the index (lastAppliedLogEntryIndex) of the Replicate message.
The text was updated successfully, but these errors were encountered:
Situation
Replica
orReplicationSucceeded
in its mailbox) runs its command handler and will send aReplicate
message to the leader.ReplicationFailed
message in some cases.ReplicationFaield
message against a Replicate message sent based on a non-latest state.ReplicationFaield
message ifLogEntry
for the previous entity's replicate message is uncommitted.ReplicationFaield
message ifLogEntry
for the previous entity's replicate message is committed, but not applied to the entity. There is a subtle timing in which the entity sends a Replicate based on a non-latest state after the leader has sent theLogEntry
to the entity.Possible Solution
An Entity sends a
Replicate
message containing itslastAppliedLogEntryIndex
. A leader will reply withReplicaionFaield
if Leader's Raft log (ReplicatedLog
) contains an entry that satisfies the all of the following conditions:LogEntry.event.entityId
is equal toReplicate.entityId
)lastAppliedLogEntryIndex
) of theReplicate
message.The text was updated successfully, but these errors were encountered: