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

core: unpack highly sentitive to the choice of bundleEntriesPerFile #360

Open
fredbi opened this issue Jan 7, 2020 · 1 comment
Open

Comments

@fredbi
Copy link
Contributor

fredbi commented Jan 7, 2020

Trying to reuse pkg/core/bundle_test.go to be used in other tests, I discovered that if a bundle has been created with a given "bundleEntriesPerFile", it cannot be unpacked later on with a different setting.

E.g. the mock creates, say, 4 files split in 2 index files with 2 entries.
When calling "Mount" which uses the default of 1000 files per index, this breaks.

This means that we cannot freely change this number as it will break all previously created bundles.

@ransomw1c
Copy link
Contributor

there are some conventions over configuration scattered throughout the application.

another constant that exists, where changing it could break source-data compatability, is the blob size.

needless to say, pack and unpack are sensitive to the choice of hashing algorithm as well, we don't abstract out the fact that we use BLAKE rather than SHA, also for instance.

not drawing conclusions here about what needs to be changed and in what order. just saying there are lots of things that could be additionally abstracted, not just this constant.

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

No branches or pull requests

2 participants