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

Update magic number from 2 to 3. #289

Closed
wants to merge 1 commit into from
Closed

Conversation

deepakjois
Copy link
Contributor

@deepakjois deepakjois commented Oct 25, 2017

Fixes #282.


This change is Reviewable

@deepakjois
Copy link
Contributor Author

deepakjois commented Oct 25, 2017

We should wait to merge this. While we are waiting, I would like to better understand the implications of this for stuff that is currently using Badger, and the guidance we can offer.

So if I understand correctly, any data that was written using a previous build of Badger cannot be read once this change goes in. One hacky workaround is to manually rewrite the Badger version from 2 -> 3 in the manifest file. Even then, it would only work if the data was written using a build of Badger post v0.8, because we made some changes to the way data was written on disk.

@manishrjain
Copy link
Contributor

We need to provide a way to backup Badger, to a standard key-value file; possibly using protocol buffers for extensibility. This needs to go into both v0.8 and v1.0 -- see BoltDB for reference. Once we have that, we need an import tool which can rebuild Badger.

@magik6k
Copy link

magik6k commented Nov 1, 2017

Just a note - we are using badger with this patch applied in IPFS 0.4.12-rc1, see https://github.com/gxed/badger/commits/master.

@deepakjois
Copy link
Contributor Author

@magik6k This is now in master, but there are some other changes as well (see #305 ). We decided to get those in because we would have needed to change the manifest version for those change.

The changes in #305 also change the Txn.Set() API slightly.

@deepakjois deepakjois closed this Nov 2, 2017
@manishrjain manishrjain deleted the dj/update-magic-number branch May 9, 2018 01:10
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