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

feat(Skiplist): Introduce a way to hand over skiplists to Badger #1696

Merged
merged 12 commits into from
Apr 27, 2021

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Apr 26, 2021

In Dgraph, we already use Raft write-ahead log. Also, when we commit transactions, we update tens of thousands of keys in one go. To optimize this write path, this PR introduces a way to directly hand over Skiplist to Badger, short circuiting Badger's Value Log and WAL.

This feature allows Dgraph to generate Skiplists while processing mutations and just hand them over to Badger during commits. It also accepts a callback which can be run when Skiplist is written to disk. This is useful for determining when to create a snapshot in Dgraph.

This change is Reviewable

@manishrjain manishrjain marked this pull request as ready for review April 27, 2021 04:18
@manishrjain manishrjain changed the title Mrjn/optimize commits Introduce a way to hand over skiplists to Badger Apr 27, 2021
@manishrjain manishrjain changed the title Introduce a way to hand over skiplists to Badger feat(Skiplist): Introduce a way to hand over skiplists to Badger Apr 27, 2021
@manishrjain manishrjain merged commit b21f591 into master Apr 27, 2021
@manishrjain manishrjain deleted the mrjn/optimize-commits branch April 27, 2021 04:37
@joshua-goldstein
Copy link
Contributor

For reference: the relevant PR in Dgraph is dgraph-io/dgraph#7777

joshua-goldstein added a commit that referenced this pull request Jan 5, 2023
mangalaman93 added a commit that referenced this pull request Feb 14, 2023
mangalaman93 added a commit that referenced this pull request Feb 14, 2023
mangalaman93 added a commit that referenced this pull request Feb 14, 2023
mangalaman93 added a commit that referenced this pull request Feb 14, 2023
mangalaman93 added a commit that referenced this pull request Feb 14, 2023
mangalaman93 added a commit that referenced this pull request Feb 14, 2023
mangalaman93 added a commit that referenced this pull request Feb 15, 2023
mangalaman93 added a commit that referenced this pull request Feb 17, 2023
mangalaman93 added a commit that referenced this pull request Feb 18, 2023
mangalaman93 added a commit that referenced this pull request Feb 18, 2023
mangalaman93 added a commit that referenced this pull request Feb 21, 2023
mangalaman93 added a commit that referenced this pull request Feb 21, 2023
fredcarle pushed a commit to fredcarle/badger that referenced this pull request Aug 1, 2023
…aph-io#1696)

In Dgraph, we already use Raft write-ahead log. Also, when we commit transactions, we update tens of thousands of keys in one go. To optimize this write path, this PR introduces a way to directly hand over Skiplist to Badger, short circuiting Badger's Value Log and WAL.

This feature allows Dgraph to generate Skiplists while processing mutations and just hand them over to Badger during commits. It also accepts a callback which can be run when Skiplist is written to disk. This is useful for determining when to create a snapshot in Dgraph.
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