Skip to content

Let check warn about legacy variants of the repo format version 1#3730

Merged
MichaelEischer merged 6 commits intorestic:masterfrom
MichaelEischer:stricter-check
Jul 23, 2022
Merged

Let check warn about legacy variants of the repo format version 1#3730
MichaelEischer merged 6 commits intorestic:masterfrom
MichaelEischer:stricter-check

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented Apr 30, 2022

What does this PR change? What problem does it solve?

The legacy S3 repository layout and mixed packs are not used for new repositories since quite some time. Especially the mixed packs are a problem as they will drastically increase the cache size and slow down everything. This PR let's check complain about these legacy variants of the repository format version 1.

The mixed packs warning leads to the somewhat ugly situation that the test data used for the check is also affected by that warning. I've decided to simply filter these warnings, as that way the test implicitly tests that we are still able to read old repositories.

The --check-unused option is also deprecated as it is now rather useless since prune no longer removes all unused blob by default. This removes the option from the CLI, but keeps it for internal test case usage.

Was the change previously discussed in an issue or on the forum?

No. I've only complained about --check-unused being confusing somewhere in the forum ;-) .
Fixes #3295

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • 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.

Unused blobs are not a problem but rather expected to exist now that
prune by default does not remove every unused blob. However, the option
has caused questions from users whether a repository is damaged or not,
so just remove that option.

Note that the remaining code is left intact as it is still useful for
our test cases.
@MichaelEischer
Copy link
Copy Markdown
Member Author

I've rebased the PR, added slightly reworded the warning printed for mixed packs and added a changelog entry. Besides that the PR is essentially unchanged.

@MichaelEischer MichaelEischer merged commit 049f4c4 into restic:master Jul 23, 2022
@MichaelEischer MichaelEischer deleted the stricter-check branch July 23, 2022 12:14
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.

Improve messaging from "restic check --check-unused" after forget and prune with --max-unused > 0

1 participant