pageserver: remove faulty debug assertion in compaction (#10610)

## Problem

This assertion is incorrect: it is legal to see another shard's data at
this point, after a shard split.

Closes: https://github.com/neondatabase/neon/issues/10609

## Summary of changes

- Remove faulty assertion
This commit is contained in:
John Spray
2025-01-31 17:43:31 +00:00
committed by GitHub
parent 10cf5e7a38
commit a93e9f22fc

View File

@@ -1503,11 +1503,9 @@ impl Timeline {
.await
.map_err(CompactionError::Other)?;
} else {
let shard = self.shard_identity.shard_index();
let owner = self.shard_identity.get_shard_number(&key);
if cfg!(debug_assertions) {
panic!("key {key} does not belong on shard {shard}, owned by {owner}");
}
// This happens after a shard split, when we're compacting an L0 created by our parent shard
debug!("dropping key {key} during compaction (it belongs on shard {owner})");
}