release/v20.03 - perf(raft): Use raft storage in managedmode (#6457) #6545
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.
This PR changes how we use badger in the wal store. Currently we run
badger in normal mode for
w
andzw
store. We've seen up to 900Kentries for the same hard state (hs) key in
zw
store. These duplicatekeys cause spikes in read latencies in
zw
. Thew
store has morecompactions compared to
zw
store and so it has lesser stale data andthus lesser spikes in read latencies.
The fix here is to open the
w
andzw
directories in managed mode andperform all writes on the same timestamp (max version in the db). This
leads to close to 0 duplicates in the store.
This PR also fixes the raft leader election issue which is a result of high
read latencies.
(cherry picked from commit 6882e37)
This change is
Docs Preview: