Add option to regenerate invalid seed indexes#216
Merged
folbricht merged 2 commits intofolbricht:masterfrom Apr 3, 2022
Merged
Add option to regenerate invalid seed indexes#216folbricht merged 2 commits intofolbricht:masterfrom
folbricht merged 2 commits intofolbricht:masterfrom
Conversation
folbricht
reviewed
Apr 3, 2022
folbricht
approved these changes
Apr 3, 2022
Sometimes we don't have the guarantee that a particular seed index is always valid. For example if a seed index is calculated and used in two different occasions, it might happen that in the meantime some of the seed files got corrupted or that they simply changed (if the seed is a writable location). One workaroud is to manually launch `verify-index` and then regenerate the index if that check fails. However this involves additional steps and is potentially slower because we need to verify the entire seed before running the `extract` command. Instead with the new option "--regenerate-invalid-seeds", Desync will automatically regenerate the seed index if the validation step fails. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
This test usually worked because "blob2.caibx" was considered before "blob2_corrupted.cabix". However this test was expecting to use "blob1.caibx", but that was not the case because in `readSeedDirs()` the index file is skipped if it is what we have set in input. Instead, we add it explicitly to force "blob1.caibx" as a seed. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
a472c91 to
741c26c
Compare
Contributor
Author
|
I also added the commit Add the correct seed in the extract test, because I noticed that from time to time that test was failing. It can be moved to its own PR if you prefer. |
JeremieA
pushed a commit
to InSimo/desync
that referenced
this pull request
Apr 10, 2026
* Add option to regenerate invalid seed indexes Sometimes we don't have the guarantee that a particular seed index is always valid. For example if a seed index is calculated and used in two different occasions, it might happen that in the meantime some of the seed files got corrupted or that they simply changed (if the seed is a writable location). One workaroud is to manually launch `verify-index` and then regenerate the index if that check fails. However this involves additional steps and is potentially slower because we need to verify the entire seed before running the `extract` command. Instead with the new option "--regenerate-invalid-seeds", Desync will automatically regenerate the seed index if the validation step fails. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com> * Add the correct seed in the extract test This test usually worked because "blob2.caibx" was considered before "blob2_corrupted.cabix". However this test was expecting to use "blob1.caibx", but that was not the case because in `readSeedDirs()` the index file is skipped if it is what we have set in input. Instead, we add it explicitly to force "blob1.caibx" as a seed. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes we don't have the guarantee that a particular seed index is
always valid.
For example if a seed index is calculated and used in two different
occasions, it might happen that in the meantime some of the seed files
got corrupted or that they simply changed (if the seed is a writable
location).
One workaroud is to manually launch
verify-indexand then regeneratethe index if that check fails. However this involves additional steps
and is potentially slower because we need to verify the entire seed
before running the
extractcommand.Instead with the new option "--regenerate-invalid-seeds", Desync will
automatically regenerate the seed index if the validation step fails.