New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix producing illegal snapshot when compaction and adding a new event same time #115
Merged
tksugimoto
merged 10 commits into
master
from
fix-illegal-snapshot-when-compaction-and-adding-a-new-event-same-time
Dec 29, 2021
Merged
Fix producing illegal snapshot when compaction and adding a new event same time #115
tksugimoto
merged 10 commits into
master
from
fix-illegal-snapshot-when-compaction-and-adding-a-new-event-same-time
Dec 29, 2021
Conversation
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
negokaz
force-pushed
the
fix-illegal-snapshot-when-compaction-and-adding-a-new-event-same-time
branch
3 times, most recently
from
December 28, 2021 08:50
1c05719
to
99afb87
Compare
instead of actor supervisor We should make RaftActor send Activate message to an entity at every launching the entity
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.
negokaz
force-pushed
the
fix-illegal-snapshot-when-compaction-and-adding-a-new-event-same-time
branch
from
December 29, 2021 01:28
5dcfb9e
to
7bbe324
Compare
tksugimoto
reviewed
Dec 29, 2021
tksugimoto
reviewed
Dec 29, 2021
tksugimoto
reviewed
Dec 29, 2021
tksugimoto
reviewed
Dec 29, 2021
src/main/scala/lerna/akka/entityreplication/testkit/TestReplicationActor.scala
Show resolved
Hide resolved
tksugimoto
reviewed
Dec 29, 2021
src/multi-jvm/scala/lerna/akka/entityreplication/typed/ClusterReplicationMultiNodeSpec.scala
Show resolved
Hide resolved
tksugimoto
reviewed
Dec 29, 2021
src/multi-jvm/scala/lerna/akka/entityreplication/typed/ReplicatedEntityMultiNodeSpec.scala
Show resolved
Hide resolved
tksugimoto
reviewed
Dec 29, 2021
The TestKit wil respond all log entries. This implies recoveryIndex of Activate message was lastLogIndex.
negokaz
force-pushed
the
fix-illegal-snapshot-when-compaction-and-adding-a-new-event-same-time
branch
from
December 29, 2021 08:33
deca752
to
a9147f9
Compare
tksugimoto
approved these changes
Dec 29, 2021
tksugimoto
deleted the
fix-illegal-snapshot-when-compaction-and-adding-a-new-event-same-time
branch
December 29, 2021 12:34
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #111