-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐞fix: Entity recovers its state of when RaftActor sends Activate
RaftActor can send TakeSnapshot message during entity recovery. Index of the snapshot is determined by lastApplied at sending TakeSnapshot. RaftActor can provide new events to the entity during entity recovery and this process increments lastApplied. RecoveryState message to recovery the entity is created from lastApplied. These will cause a mismatch of the index of the snapshot and recovered state of the entity. For more details, see #111. The Activate message allows RaftActor to restore the state at just RaftActor creates the entity.
- Loading branch information
Showing
19 changed files
with
394 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/main/scala/lerna/akka/entityreplication/raft/protocol/FetchEntityEvents.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package lerna.akka.entityreplication.raft.protocol | ||
|
||
import akka.actor.typed.ActorRef | ||
import lerna.akka.entityreplication.model.{ NormalizedEntityId, NormalizedShardId } | ||
import lerna.akka.entityreplication.model.NormalizedEntityId | ||
import lerna.akka.entityreplication.raft.model.{ LogEntry, LogEntryIndex } | ||
import lerna.akka.entityreplication.typed.ClusterReplication.ShardCommand | ||
|
||
private[entityreplication] final case class FetchEntityEvents( | ||
entityId: NormalizedEntityId, | ||
from: LogEntryIndex, | ||
to: LogEntryIndex, | ||
replyTo: ActorRef[FetchEntityEventsResponse], | ||
) | ||
) extends ShardCommand | ||
|
||
private[entityreplication] final case class FetchEntityEventsResponse(events: Seq[LogEntry]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.