-
Notifications
You must be signed in to change notification settings - Fork 44
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
chore: Update to badger v3, and use badger as default in memory store #56
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AndrewSisley
added
bug
Something isn't working
feature
New feature or request
area/datastore
Related to the datastore / storage engine system
labels
Nov 23, 2021
This was
linked to
issues
Nov 23, 2021
Closed
AndrewSisley
force-pushed
the
sisley/chore/I52-badger-3
branch
from
November 23, 2021 21:53
c64a51c
to
53c1aa4
Compare
AndrewSisley
commented
Nov 25, 2021
BadgerDB will panic if these are not closed before disposing the enclosing transaction
Record inserted is not within the context of the transaction, and thus not available to the query on the transaction
Is largely a copy-paste of the v2 ipfs code found here (with version change, and some non-compiling custom-defaults dropped)
AndrewSisley
force-pushed
the
sisley/chore/I52-badger-3
branch
from
November 25, 2021 21:09
53c1aa4
to
e1c2caa
Compare
jsimnz
approved these changes
Nov 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me. Great thing about these datastore interfaces is theres not much to change.
I think we'll prob revisit the db.Options
stuff, but that can be deferred to whenever.
This was referenced Dec 2, 2021
Closed
Closed
shahzadlone
pushed a commit
to shahzadlone/defradb
that referenced
this pull request
Feb 23, 2024
…sourcenetwork#56) * Close datastore iterator on scan close * Close superseded iterators before orphaning BadgerDB will panic if these are not closed before disposing the enclosing transaction * Create transaction after database has been populated Record inserted is not within the context of the transaction, and thus not available to the query on the transaction * Add badger v3 wrapper Is largely a copy-paste of the v2 ipfs code found here (with version change, and some non-compiling custom-defaults dropped) * Use badger v3 for file-based datastore * Replace MapDatastore with badger InMemory store
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/datastore
Related to the datastore / storage engine system
bug
Something isn't working
feature
New feature or request
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.
Closes #52
Closes #40
Probable production bugs found and fixed with commits:
Close datastore iterator on scan close
, affecting only limit I thinkClose superseded iterators before orphaning
, affecting joins (possibly only joins inside of child groups)Commit
Create transaction after database has been populated
modifies the fetcher tests as previously the transaction was created too early, and the tests only passed as the transaction was ignored by the original MapDatastoreUsers should be able to upgrade the file store using the steps in the badger FAQ: https://dgraph.io/docs/badger/faq/ but I have not tested this.