Fix setting of ID in DecodeIndex#3025
Merged
MichaelEischer merged 1 commit intorestic:masterfrom Oct 17, 2020
Merged
Conversation
This was referenced Oct 17, 2020
MichaelEischer
approved these changes
Oct 17, 2020
Member
MichaelEischer
left a comment
There was a problem hiding this comment.
LGTM. Sorry for breaking #2842.
Contributor
Author
|
No worries. Shows that the integration tests are working 👍 |
Contributor
|
Whoops, sorry! |
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.
What does this PR change? What problem does it solve?
It seems like #3019 removed the setting if the index ID in
DecodeIndex. Currently, the index ID is only used to remove unused index files from the cache which is now broken but should not affect the usage of restic too much.However, #2842 depends on this functionality to be able to delete obsolete index files after the new index is built.
This PR again adds this functionality to
DecodeIndex. Also added a test to check that the index is really set.Was the change discussed in an issue or in the forum before?
Found it when debugging an unexpected error in #2842
Checklist
changelog/unreleased/that describes the changes for our users (template here)gofmton the code in all commits