Skip to content

dt/ct/l0_gc: Fix flaky node-failure phase of resilience test#31042

Open
oleiman wants to merge 1 commit into
devfrom
ci/core-16396/l0-gc-resilience
Open

dt/ct/l0_gc: Fix flaky node-failure phase of resilience test#31042
oleiman wants to merge 1 commit into
devfrom
ci/core-16396/l0-gc-resilience

Conversation

@oleiman

@oleiman oleiman commented Jul 7, 2026

Copy link
Copy Markdown
Member

The node-failure phase asserted the surviving nodes keep deleting L0 objects while a node is down. But GC gates on cluster health via the safety monitor, which pauses collection whenever a node is down, so the old check only passed when it caught in-flight deletes in the brief window before the block engaged, and timed out otherwise.

Assert the real contract instead: GC pauses while the node is down (safety_blocked_rounds climbs on the survivors), then resumes once the node is back and the cluster is healthy again (cluster-wide objects_deleted advances past a post-restart baseline).

Backports Required

  • [] none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v26.1.x
  • v25.3.x
  • v25.2.x

Release Notes

  • none

@oleiman oleiman self-assigned this Jul 7, 2026
@oleiman oleiman force-pushed the ci/core-16396/l0-gc-resilience branch from 2fe96c9 to 127546c Compare July 7, 2026 21:36
@oleiman

oleiman commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

/ci-repeat 2
dt-repeat 100
tests/rptest/tests/cloud_topics/l0_gc_test.py::CloudTopicsL0GCResilienceTest

@oleiman

oleiman commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

/ci-repeat 2
dt-repeat=100
tests/rptest/tests/cloud_topics/l0_gc_test.py::CloudTopicsL0GCResilienceTest

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

CI test results

test results on build#86838
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(PASS) CloudTopicsL0GCResilienceTest test_cluster_disruption_resilience {"cloud_storage_type": 2} integration https://buildkite.com/redpanda/redpanda/builds/86838#019f3ea4-5059-4b9b-8d23-9df67f3caf3f 109/110 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0000, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCResilienceTest&test_method=test_cluster_disruption_resilience

The node-failure phase asserted the surviving nodes keep deleting L0
objects while a node is down. But GC gates on cluster health via the
safety monitor, which pauses collection whenever a node is down, so the
old check only passed when it caught in-flight deletes in the brief
window before the block engaged, and timed out otherwise.

Assert the real contract instead: GC pauses while the node is down
(safety_blocked_rounds climbs on the survivors), then resumes once the
node is back and the cluster is healthy again (cluster-wide
objects_deleted advances past a post-restart baseline).

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
@oleiman oleiman force-pushed the ci/core-16396/l0-gc-resilience branch from 127546c to 406e6cb Compare July 7, 2026 23:43
@oleiman oleiman marked this pull request as ready for review July 7, 2026 23:43
Copilot AI review requested due to automatic review settings July 7, 2026 23:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the cloud-topics L0 GC resilience test to assert the correct behavior during node failures: GC should pause while the cluster is unhealthy (per safety monitor gating) and resume once the cluster returns to health, avoiding a racey/flaky assertion based on in-flight deletes.

Changes:

  • Add a helper to read the vectorized_cloud_topics_l0_gc_safety_blocked_rounds_total metric.
  • Update the node-failure phase of the resilience test to assert safety-blocked rounds advance while a node is down.
  • Update the recovery phase to assert cluster-wide objects_deleted advances after restart (avoiding reliance on the restarted node’s reset counters).

self.redpanda.start_node(kill_node, timeout=30, node_id_override=kill_node_id)

self.logger.info("Waiting for restarted node to resume GC")
deleted_after_restart = self.get_num_objects_deleted()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there's still a tiny race window here where we could GC everything left to be GC'd between node restart and here, and then the wait_until will time out.

Capturing the number of objects deleted from a live node before restarting the dead one should be reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants