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

Fix missing blob error #33

Merged
merged 3 commits into from
Oct 17, 2022

Conversation

ariel-miculas
Copy link
Collaborator

The error occurs because the code assumes that all the chunks are generated for all the previous files. This is not the case, since the chunker splits up only the first part of the buffer into chunks and there is a leftover part that will be chunked together with the next files (or if there are no next files, the chunker will be forced to chunk the leftover).

Since the buffer containing the concatenated files will always be bigger than the concatenated generated chunks, the new approach is to iterate through the generated chunks instead of the previous files. Since every generated chunk will have an associated file or a list of files, the code will not run into a similar 'missing previous file' error.

@ariel-miculas ariel-miculas force-pushed the fix_missing_blob_error branch 2 times, most recently from 50fd937 to 0075bf7 Compare October 7, 2022 14:47
@ariel-miculas
Copy link
Collaborator Author

Formatted the flie with rustfmt.

@hallyn hallyn requested a review from kprav33n October 7, 2022 22:18
@hallyn
Copy link
Contributor

hallyn commented Oct 7, 2022

Hm, this doesn't build cleanly here - but then neither does the master branch.

@ariel-miculas
Copy link
Collaborator Author

After #37 is merged I will update this branch with a fix for a linter error and the CI actions will run on this branch as well.

Signed-off-by: Ariel Miculas <amiculas@cisco.com>
@ariel-miculas ariel-miculas force-pushed the fix_missing_blob_error branch 3 times, most recently from a778d35 to 56421a9 Compare October 12, 2022 15:55
ariel-miculas and others added 2 commits October 12, 2022 19:34
Signed-off-by: Ariel Miculas <amiculas@cisco.com>
The error occurs because the code assumes that all the chunks are
generated for all the previous files. This is not the case, since the
chunker splits up only the first part of the buffer into chunks and
there is a leftover part that will be chunked together with the next
files (or if there are no next files, the chunker will be forced to
chunk the leftover).

Since the buffer containing the concatenated files will always be bigger
than the concatenated generated chunks, the new approach is to iterate
through the generated chunks instead of the previous files. Since every
generated chunk will have an associated file or a list of files, the
code will not run into a similar 'missing previous file' error.

Signed-off-by: Ariel Miculas <amiculas@cisco.com>
@hallyn hallyn merged commit 26e705c into project-machine:master Oct 17, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants