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
Suppose: An entity belonging to a leader has some ProcessCommand in its mailbox (might happen on heavy load)
A RaftActor (called RaftActor A, is the leader) that is responsible for an entity (called Entity X) becomes a follower for some reason.
Entity X (on the Ready state) executes its command handler for the existing one ProcessCommand in its mailbox.
Entity X sends a Replicate message to RaftActor A and then waits for a replication result (ReplicationSucceeded, ReplicationFaield, or Replica) on the WaitForReplication state.
The RaftActor A discards the Replicate message from Entity X because RaftActor A is a follower.
Entity X continues to wait for a replication result until the leader on another node (called RaftActor B) completes another new replication for an entity (having the same ID, belonging to the RaftActor B, called Entity Y).
If RaftActor B completes new replication for Entity Y, RaftActor A sends Replica to Entity X eventually.
Entity X (on the WaitForReplication state) receives Replica, becomes the Ready state, and then un-stash all stashed messages.
If Entity X stashed more ProcessCommand before, it repeats the above behavior.
Possible Solution
RaftActor (Follower and Candidate, not Leader) replies to an entity with a ReplicationFaield message instead if it receives a Replicate message.
The text was updated successfully, but these errors were encountered:
Situation
Suppose: An entity belonging to a leader has some
ProcessCommand
in its mailbox (might happen on heavy load)Ready
state) executes its command handler for the existing oneProcessCommand
in its mailbox.Replicate
message to RaftActor A and then waits for a replication result (ReplicationSucceeded
,ReplicationFaield
, orReplica
) on theWaitForReplication
state.Replicate
message from Entity X because RaftActor A is a follower.Replica
to Entity X eventually.WaitForReplication
state) receivesReplica
, becomes theReady
state, and then un-stash all stashed messages.ProcessCommand
before, it repeats the above behavior.Possible Solution
RaftActor (Follower and Candidate, not Leader) replies to an entity with a
ReplicationFaield
message instead if it receives aReplicate
message.The text was updated successfully, but these errors were encountered: