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

replace badger v1 with v2 #101

Closed
mvdan opened this issue Sep 14, 2020 · 7 comments
Closed

replace badger v1 with v2 #101

mvdan opened this issue Sep 14, 2020 · 7 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@mvdan
Copy link

mvdan commented Sep 14, 2020

BadgerDB v2 has been out for nearly a year, and it's overall better in multiple ways and better supported.

It shouldn't be too difficult to switch, either:

Also, there are no breaking API changes since v1.6.0.

Would a PR be welcome here?

@mvdan mvdan added the need/triage Needs initial labeling and prioritization label Sep 14, 2020
@welcome
Copy link

welcome bot commented Sep 14, 2020

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@aschmahmann
Copy link
Contributor

@mvdan we have https://github.com/ipfs/go-ds-badger2 for Badger 2. Arguably there was a better go mod way to do this, but it definitely makes releasing patches to the badger1 and badger2 datastores at the same time less error prone.

However, if you'd like to help with some of the plugging in of this into go-ipfs then that would definitely be welcome.
ipfs/kubo#6818
ipfs/kubo#4279

@mvdan
Copy link
Author

mvdan commented Sep 14, 2020

Oh jeez, I'm not sure how I missed that :) Perhaps add a clear notice in the README in this repo? Because if you don't know where to look, it's very easy to miss the newer library, like I did.

I'm interested to hear how two git repositories make maintaining both versions at the same time easier, though. I maintain multiple major versions of modules in a few git repositories and it's generally easy enough to do.

@aschmahmann
Copy link
Contributor

Perhaps add a clear notice in the README in this repo? Because if you don't know where to look, it's very easy to miss the newer library, like I did.

Seems reasonable 😄

I'm interested to hear how two git repositories make maintaining both versions at the same time easier, though.

You'd have to ask @Kubuxu, but it looks like there were some concerns mentioned in ipfs/kubo#6818. I can't speak to why he did it that way, but if I were in his shoes I probably would've done the same thing.

go mod has enough complexity and corner cases such that if you were trying to just get this moving then copying the repo is the approach that's guaranteed to just work™.

@willscott
Copy link
Contributor

fwiw, both badger and badger2 have been getting fuzz test by oss-fuzz for the last several months, which hopefully is starting to increase our confidence in the badger2 implementation.

@aschmahmann
Copy link
Contributor

Readme updated #102

@mvdan
Copy link
Author

mvdan commented Sep 14, 2020

If any extra experience counts, I've switched a couple of live projects to v2 earlier this year, and so far zero issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

3 participants