Skip to content
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

release/v1.2 - perf(raft): Use raft storage in managedmode (#6457) #6546

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Sep 21, 2020

This PR changes how we use badger in the wal store. Currently we run
badger in normal mode for w and zw store. We've seen up to 900K
entries for the same hard state (hs) key in zw store. These duplicate
keys cause spikes in read latencies in zw. The w store has more
compactions compared to zw store and so it has lesser stale data and
thus lesser spikes in read latencies.

The fix here is to open the w and zw directories in managed mode and
perform 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 Reviewable

Docs Preview: Dgraph Preview

This PR changes how we use badger in the wal store. Currently we run
badger in normal mode for `w` and `zw` store. We've seen up to 900K
entries for the same hard state (hs) key in `zw` store. These duplicate
keys cause spikes in read latencies in `zw`. The `w` store has more
compactions compared to `zw` store and so it has lesser stale data and
thus lesser spikes in read latencies.

The fix here is to open the `w` and `zw` directories in managed mode and
perform 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)
(cherry picked from commit ea343c9)
Copy link
Contributor

@martinmr martinmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 8 of 8 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @manishrjain)

@jarifibrahim jarifibrahim merged commit 9732c30 into release/v1.2 Sep 28, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/r1.2-w-managed branch September 28, 2020 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants