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

plugin/loader: preloads dgraph-io/badger (v1), which is incompatible with its v2 #7122

Closed
mvdan opened this issue Apr 8, 2020 · 3 comments
Closed
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@mvdan
Copy link
Contributor

mvdan commented Apr 8, 2020

https://github.com/ipfs/go-ipfs/blob/23af25f1767bb38a05cff7a736c339fec00bcf7f/plugin/loader/preload.go#L4 means that go-ipfs forces importing the badger DB module v1, which is unfortunately incompatible at init time with its v2 - it will panic. See hypermodeinc/badger#1208.

While I think this is a bug on their part, I also think it's strange that go-ipfs forcibly pulls in v1 of badger. At least it seems to me like it should be configurable. Ideally, it should be pulling in v2 instead, which was first released about six months ago.

Happy to help or bounce ideas if needed. I've also pinged upstream on the issue above, but I think there's something to be done here as well.

@mvdan mvdan added the kind/bug A bug in existing code (including security flaws) label Apr 8, 2020
@mvdan
Copy link
Contributor Author

mvdan commented Apr 8, 2020

I realise there's #6818, but that seems like an enhancement, whereas I'd call this more of a bug :)

@Stebalien
Copy link
Member

Go-ipfs uses badger 1 because we haven't tested badger 2 which we consider to be a different datastore due to the format incompatibilities. We plan on introducing a plugin for badger 2, but haven't yet merged the appropriate patches.

@mvdan
Copy link
Contributor Author

mvdan commented Apr 8, 2020

Fair enough, thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants