Skip to content

Commit

Permalink
pageserver: remove faulty debug assertion in compaction (#10610)
Browse files Browse the repository at this point in the history
## Problem

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

Closes: #10609

## Summary of changes

- Remove faulty assertion
  • Loading branch information
jcsp authored Jan 31, 2025
1 parent 10cf5e7 commit c4ff126
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pageserver/src/tenant/timeline/compaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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})");
}

Expand Down

0 comments on commit c4ff126

Please sign in to comment.