Skip to content

Commit

Permalink
fix(pagesever): stablize gc-compaction tests (#10621)
Browse files Browse the repository at this point in the history
## Problem

Hopefully this can resolve
#10517. The reason why the
test is flaky is that after restart the compute node might write some
data so that the pageserver flush some layers, and in the end, causing
L0 compaction to run, and we cannot get the test scenario as we want.

## Summary of changes

Ensure all L0 layers are compacted before starting the test.

Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh authored Feb 4, 2025
1 parent 06090bb commit cab60b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test_runner/regress/test_compaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ def compaction_finished():
workload.churn_rows(row_count, env.pageserver.id)
# compact 3 times if mode is before_restart
n_compactions = 3 if compaction_mode == "before_restart" else 1
ps_http.timeline_compact(
tenant_id, timeline_id, force_l0_compaction=True, wait_until_uploaded=True
)
for _ in range(n_compactions):
# Force refresh gc info to have gc_cutoff generated
ps_http.timeline_gc(tenant_id, timeline_id, None)
Expand Down

1 comment on commit cab60b6

@github-actions
Copy link

Choose a reason for hiding this comment

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

7565 tests run: 7203 passed, 1 failed, 361 skipped (full report)


Failures on Postgres 16

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_ingest_logical_message[release-pg16-github-actions-selfhosted-fsync-131072]"
Flaky tests (1)

Postgres 14

Code coverage* (full report)

  • functions: 33.2% (8565 of 25787 functions)
  • lines: 49.0% (71903 of 146769 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
cab60b6 at 2025-02-04T18:40:33.746Z :recycle:

Please sign in to comment.