Repository navigation
indexserver: delete fully tombstoned compound shards instead of merging - #1215
Merged
Merged
Conversation
When every repo in a compound shard was tombstoned, vacuum still merged the shard with itself. The merge kept no repos, so it wrote an empty compound-da39a3ee..._v17 shard (the SHA1 of no names) that NewSearcher rejects with "len(repos)=0. Cannot backfill ID". This happened on dotcom indexed-search pods. removeTombstones now deletes such a shard without merging. index.Merge also refuses to write a shard with no repos, so no other caller can produce one. Explode already removes empty shards that exist on disk (#1088). Amp-Thread-ID: https://ampcode.com/threads/T-55117bf6-2d9c-44b2-8268-923e35450020
keegancsmith
force-pushed
the
k/vacuum-empty-compound-shard
branch
from
October 27, 2026 19:02
e2b2e4f to
8a5f485
Compare
keegancsmith
marked this pull request as ready for review
October 27, 2026 19:03
keegancsmith
enabled auto-merge (squash)
October 27, 2026 19:03
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.
When every repo in a compound shard is tombstoned, vacuum merges the shard with itself and writes an empty
compound-da39a3ee…shard that zoekt-webserver can't load (len(repos)=0. Cannot backfill ID). This was seen on dotcom.removeTombstonesnow deletes such a shard instead of merging it.index.Mergealso refuses to write a shard with no repositories.#1088 already cleans up empty shards on explode. This is a smaller alternative to #1089, which does more but is blocked on a cleanup bug that can delete valid shards.