Skip to content

Commit

Permalink
pageserver: don't drop multixact slrus on non zero shards (#10086)
Browse files Browse the repository at this point in the history
## Problem

We get slru truncation commands on non-zero shards.
Compaction will drop the slru dir keys and ingest will fail when
receiving such records.
#10080 fixed it for clog, but
not for multixact.

## Summary of changes

Only truncate multixact slrus on shard zero. I audited the rest of the
ingest code and it looks
fine from this pov.
  • Loading branch information
VladLazar authored Dec 11, 2024
1 parent 9ae980b commit a53db73
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pageserver/src/walingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,16 +1049,18 @@ impl WalIngest {

// Delete all the segments except the last one. The last segment can still
// contain, possibly partially, valid data.
while segment != endsegment {
modification
.drop_slru_segment(SlruKind::MultiXactMembers, segment as u32, ctx)
.await?;
if modification.tline.get_shard_identity().is_shard_zero() {
while segment != endsegment {
modification
.drop_slru_segment(SlruKind::MultiXactMembers, segment as u32, ctx)
.await?;

/* move to next segment, handling wraparound correctly */
if segment == maxsegment {
segment = 0;
} else {
segment += 1;
/* move to next segment, handling wraparound correctly */
if segment == maxsegment {
segment = 0;
} else {
segment += 1;
}
}
}

Expand Down

1 comment on commit a53db73

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7073 tests run: 6757 passed, 1 failed, 315 skipped (full report)


Failures on Postgres 17

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_idle_checkpoints[debug-pg17]"
Flaky tests (5)

Postgres 17

Postgres 15

Test coverage report is not available

The comment gets automatically updated with the latest test results
a53db73 at 2024-12-11T15:55:33.032Z :recycle:

Please sign in to comment.