About the consistency of kvstore in raftexample when restarting #16425
-
Assuming that kvstore has multiple snapshots and multiple wals on disk, when kvstore restarts, it will first execute My question is, how can the snapshot loaded in replayWAL be the same as the snapshot loaded by newKVStore? If not, how to ensure that the records in raft are consistent with the data in kvstore? Because when we create a snapshot, we first create a snapshot and then write wal, so it is possible that the latest snapshot is not recorded by wal. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found that how to recovery data in newKVStore has undergone many modifications. Maybe the current implementation does not make a consistency guarantee? see PR: #11889 There are still these PRs discussing this issue before: #9262 #9263 |
Beta Was this translation helpful? Give feedback.
-
I make a PR #16438 to fix that. |
Beta Was this translation helpful? Give feedback.
I make a PR #16438 to fix that.