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: ADR-040: Implement BadgerDB backend #9848

Merged
merged 11 commits into from
Sep 15, 2021

Conversation

roysc
Copy link
Contributor

@roysc roysc commented Aug 4, 2021

Description

Partially resolves: vulcanize#14

Implements a BadgerDB-based backend for the DB interface introduced by #9573 and specified by ADR-040. This uses Badger's "managed" mode for version management, and supports optimistically concurrent transactions (required one patch upstream to fix handling of write conflicts).


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules - n/a
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@roysc
Copy link
Contributor Author

roysc commented Aug 4, 2021

As this depends on #9573, I'm making it a draft for now and will rebase when that is merged.

Also, not sure if more documentation is needed beyond godoc comments.

@robert-zaremba robert-zaremba mentioned this pull request Aug 6, 2021
38 tasks
@roysc roysc marked this pull request as ready for review August 10, 2021 13:43
@roysc roysc force-pushed the roysc/adr-040-db-badger branch 4 times, most recently from 83a1c60 to 4d24407 Compare August 23, 2021 05:01
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

I'm going to wait until the mem-db PR is reviewed and merged before reviewing RocksDB and BadgerDB variants. We can rebase on master after it's merged.

@tac0turtle
Copy link
Member

@roysc can this be rebased. Then we can begin reviewing

@roysc roysc force-pushed the roysc/adr-040-db-badger branch from dabc06f to 6304cc9 Compare August 31, 2021 10:33
@roysc
Copy link
Contributor Author

roysc commented Aug 31, 2021

Rebased and ready for review

db/README.md Outdated Show resolved Hide resolved
db/README.md Outdated Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
db/badgerdb/db.go Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
db/badgerdb/db.go Outdated Show resolved Hide resolved
roysc and others added 4 commits September 10, 2021 19:47
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
save more versions, fewer values
@roysc
Copy link
Contributor Author

roysc commented Sep 10, 2021

Along with review follow-ups, I fixed the version manager initialization so it's not dependent on ordered input, and updated a test case to verify its behavior.

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK

@tac0turtle tac0turtle added A:automerge Automatically merge PR once all prerequisites pass. C:Store labels Sep 13, 2021
@tac0turtle
Copy link
Member

@roysc could you update to master, this will allow the bot to merge the PR

@alexanderbez
Copy link
Contributor

We can merge this, yes?

@mergify mergify bot merged commit ae9834e into cosmos:master Sep 15, 2021
@orijbot
Copy link

orijbot commented Sep 15, 2021

@roysc roysc deleted the roysc/adr-040-db-badger branch September 15, 2021 04:20
@robert-zaremba robert-zaremba mentioned this pull request Oct 13, 2021
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: BadgerDB & RocksDB backends for the new cosmos-db interface
4 participants