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

Ensure backwards-compatibility for bincode-serialized data #208

Open
badboy opened this issue Oct 12, 2020 · 3 comments
Open

Ensure backwards-compatibility for bincode-serialized data #208

badboy opened this issue Oct 12, 2020 · 3 comments

Comments

@badboy
Copy link
Member

badboy commented Oct 12, 2020

As the "safe-mode" storage uses bincode to serialize the data into a file on disk, there should be some tests that this won't break.
rkv needs to be able to load data written with previous versions. bincode doesn't necessarily guarantee that (though to my knowledge they haven't broken it either).

Some tests could be useful.
Write some data into a file, then use that file's data in a test (either load it or embed it directly) and check that it can be loaded and contains the expected data. Dependency updates shouldn't break that test then.

@victorporof
Copy link
Contributor

There's probably hundreds of tests for this already. Is there one in particular you'd like to see better implemented?

@badboy
Copy link
Member Author

badboy commented Dec 2, 2020

In this repository or on bincode itself?
I might have missed that here.

@victorporof
Copy link
Contributor

Hmm, I think I misread your original comment. You meant storing the current version of a database file, and persisting that as a test for future versions. Gotcha – yes, this is a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants