Skip to content

Commit

Permalink
fix(pageserver): update remote latest_gc_cutoff after gc-compaction (#…
Browse files Browse the repository at this point in the history
…10209)

## Problem

close #10208
part of #9114 

## Summary of changes

* Ensure remote `latest_gc_cutoff` is up-to-date before removing any
files for gc-compaction.

Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh authored Dec 19, 2024
1 parent 197a89a commit 9c53b41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pageserver/src/tenant/timeline/compaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2581,6 +2581,13 @@ impl Timeline {
.open_mut()?
.finish_gc_compaction(&layer_selection, &compact_to, &self.metrics)
};

// Schedule an index-only upload to update the `latest_gc_cutoff` in the index_part.json.
// Otherwise, after restart, the index_part only contains the old `latest_gc_cutoff` and
// find_gc_cutoffs will try accessing things below the cutoff. TODO: ideally, this should
// be batched into `schedule_compaction_update`.
let disk_consistent_lsn = self.disk_consistent_lsn.load();
self.schedule_uploads(disk_consistent_lsn, None)?;
self.remote_client
.schedule_compaction_update(&layer_selection, &compact_to)?;

Expand Down

1 comment on commit 9c53b41

@github-actions
Copy link

Choose a reason for hiding this comment

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

7245 tests run: 6936 passed, 1 failed, 308 skipped (full report)


Failures on Postgres 16

  • test_storage_controller_many_tenants[github-actions-selfhosted]: release-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_storage_controller_many_tenants[release-pg16-github-actions-selfhosted]"
Flaky tests (3)

Postgres 17

Postgres 16

  • test_physical_replication_config_mismatch_too_many_known_xids: release-arm64

Postgres 14

Code coverage* (full report)

  • functions: 31.2% (8396 of 26877 functions)
  • lines: 47.9% (66671 of 139059 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
9c53b41 at 2024-12-19T20:55:17.467Z :recycle:

Please sign in to comment.