mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-01 04:20:39 +00:00
Only churn rows once in test_scrubber_physical_gc_ancestors (#10481)
## Problem PR #10457 was supposed to fix the flakiness of `test_scrubber_physical_gc_ancestors`, but instead it made it even more flaky. However, the original error causes disappeared, now to be replaced by key not found errors. See this for a longer explanation: https://github.com/neondatabase/neon/issues/10391#issuecomment-2608018967 ## Solution This does one churn rows after all compactions, and before we do any timeline gc's. That way, we remain more accessible at older lsn's.
This commit is contained in:
@@ -271,8 +271,14 @@ def test_scrubber_physical_gc_ancestors(neon_env_builder: NeonEnvBuilder, shard_
|
||||
ps.http_client().timeline_compact(
|
||||
shard, timeline_id, force_image_layer_creation=True, wait_until_uploaded=True
|
||||
)
|
||||
# Add some WAL so that we don't gc at the latest remote consistent lsn
|
||||
workload.churn_rows(1)
|
||||
|
||||
# Add some WAL so that we don't gc at the latest remote consistent lsn
|
||||
workload.churn_rows(10)
|
||||
|
||||
# Now gc the old stuff away
|
||||
for shard in shards:
|
||||
ps = env.get_tenant_pageserver(shard)
|
||||
assert ps is not None
|
||||
ps.http_client().timeline_gc(shard, timeline_id, 0)
|
||||
|
||||
# We will use a min_age_secs=1 threshold for deletion, let it pass
|
||||
|
||||
Reference in New Issue
Block a user