Skip to content

Fix setting of ID in DecodeIndex#3025

Merged
MichaelEischer merged 1 commit intorestic:masterfrom
aawsome:fix-index-ids
Oct 17, 2020
Merged

Fix setting of ID in DecodeIndex#3025
MichaelEischer merged 1 commit intorestic:masterfrom
aawsome:fix-index-ids

Conversation

@aawsome
Copy link
Copy Markdown
Contributor

@aawsome aawsome commented Oct 17, 2020

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

  • I have read the Contribution Guidelines
  • I have enabled maintainer edits for this PR
  • I have added tests for all changes in this PR
  • I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Sorry for breaking #2842.

@MichaelEischer MichaelEischer merged commit 96a912b into restic:master Oct 17, 2020
@aawsome
Copy link
Copy Markdown
Contributor Author

aawsome commented Oct 17, 2020

No worries. Shows that the integration tests are working 👍

@aawsome aawsome deleted the fix-index-ids branch October 17, 2020 10:42
@greatroar
Copy link
Copy Markdown
Contributor

Whoops, sorry!

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.

3 participants