Skip to content

Commit

Permalink
fix(pageserver): skip metadata compaction is LSN is not accumulated e…
Browse files Browse the repository at this point in the history
…nough (#7962)

close #7937

Only trigger metadata image layer creation if enough delta layers are
accumulated.

Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh authored Jun 6, 2024
1 parent 0145099 commit 5d05013
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pageserver/src/tenant/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4446,6 +4446,12 @@ impl Timeline {
if mode == ImageLayerCreationMode::Initial {
return Err(CreateImageLayersError::Other(anyhow::anyhow!("no image layer should be created for metadata keys when flushing frozen layers")));
}
if mode == ImageLayerCreationMode::Try && !check_for_image_layers {
// Skip compaction if there are not enough updates. Metadata compaction will do a scan and
// might mess up with evictions.
start = img_range.end;
continue;
}
} else if let ImageLayerCreationMode::Try = mode {
// check_for_image_layers = false -> skip
// check_for_image_layers = true -> check time_for_new_image_layer -> skip/generate
Expand Down

1 comment on commit 5d05013

@github-actions
Copy link

Choose a reason for hiding this comment

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

3280 tests run: 3127 passed, 1 failed, 152 skipped (full report)


Failures on Postgres 14

  • test_basebackup_with_high_slru_count[github-actions-selfhosted-sequential-10-13-30]: release
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_basebackup_with_high_slru_count[release-pg14-github-actions-selfhosted-sequential-10-13-30]"
Flaky tests (3)

Postgres 15

  • test_storage_controller_smoke: debug

Postgres 14

  • test_subscriber_restart: release
  • test_vm_bit_clear_on_heap_lock: debug

Code coverage* (full report)

  • functions: 31.5% (6604 of 20937 functions)
  • lines: 48.5% (51058 of 105314 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
5d05013 at 2024-06-06T17:21:13.271Z :recycle:

Please sign in to comment.