Skip to content

Prevent creation of oversized indexes and automatically rewrite them.#5249

Merged
MichaelEischer merged 4 commits intorestic:masterfrom
MichaelEischer:fix-repair-index
Mar 22, 2025
Merged

Prevent creation of oversized indexes and automatically rewrite them.#5249
MichaelEischer merged 4 commits intorestic:masterfrom
MichaelEischer:fix-repair-index

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented Feb 16, 2025

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

Since restic 0.17.0, restic repair index --read-all-packs creates a single large index, which significantly increases memory consumption. The PR changes the MasterIndex.StorePack method signature to prevent incorrect usages (aka. not immediately uploading full indexes).

In addition, restic repair index now automatically rewrites such oversized indexes.

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

Fixes https://forum.restic.net/t/fix-broken-snapshot/9051

Checklist

  • 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'm done! This pull request is ready for review.

Copy link
Copy Markdown
Member Author

@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.

@MichaelEischer MichaelEischer merged commit 6924937 into restic:master Mar 22, 2025
11 checks passed
@MichaelEischer MichaelEischer deleted the fix-repair-index branch March 22, 2025 13:29
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.

1 participant