Skip to content

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.
ghost pushed a commit that referenced this pull request Jul 3, 2025
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.
ghost pushed a commit that referenced this pull request Jul 3, 2025
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.

3 participants