-
Notifications
You must be signed in to change notification settings - Fork 1
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 inconsistency after InstallSnapshot #128
Conversation
The snapshot synchronization should retrieve snapshots installed by another synchronization.
This event indicates that the snapshots has been updated by snapshot synchronization. The other member which receives InstallSnapshot from this member will read the event.
…copying snapshots batch
…nable RaftEventAdapter
…stLogIndex with 'filter'
src/test/scala/lerna/akka/entityreplication/util/RaftEventJournalTestKit.scala
Show resolved
Hide resolved
src/test/scala/lerna/akka/entityreplication/util/RaftEventJournalTestKit.scala
Show resolved
Hide resolved
748c664
to
c1ed3d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great👍
I left some comments. I will review SnapshotSyncManagerSpec
and RaftEventJournalTestKitSpec
from now.
src/test/scala/lerna/akka/entityreplication/util/EventStore.scala
Outdated
Show resolved
Hide resolved
src/test/scala/lerna/akka/entityreplication/util/RaftEventJournalTestKit.scala
Outdated
Show resolved
Hide resolved
src/test/scala/lerna/akka/entityreplication/util/RaftEventJournalTestKit.scala
Outdated
Show resolved
Hide resolved
src/main/scala/lerna/akka/entityreplication/raft/snapshot/sync/SnapshotSyncManager.scala
Show resolved
Hide resolved
src/test/scala/lerna/akka/entityreplication/util/RaftEventJournalTestKit.scala
Outdated
Show resolved
Hide resolved
The override path should be "lerna.akka.entityreplication.raft.election-timeout".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test code RaftEventJournalTestKitSpec
and SnapshotSyncManagerSpec
LGTM 👍
src/test/scala/lerna/akka/entityreplication/raft/snapshot/sync/SnapshotSyncManagerSpec.scala
Outdated
Show resolved
Hide resolved
1f6df99
to
ba4a77c
Compare
This method has no side effects.
…fix-inconsistency-after-installsnapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Closes #127
Overview
SnapshotCopied
thatSnapshotSyncManager
saves after copying snapshotsentityId
s that indicate that the snapshot that was copiedEntitySnapshotsUpdatedTag
(CompactionCompletedTag
)SnapshotSyncManager
readsSnapshotCopied
s that the leader'sSnapshotSyncManager
persistedSnapshotCopied
that produced by snapshot synchronization that the leader has executedSnapshotSyncManager
readsCompactionCompleted
and alsoSnapshotCopied
SnapshotSyncManager
can identify allentityId
s that should copy snapshotsNOTE
This change does not fix the potential consistency problem.
Systems that already have executed
InstallSnapshot
may still occur this issue even if applying this change.