Repository navigation
test/rgw/notifications: stabilize flaky persistent topic config tests - #70530
Conversation
There was a problem hiding this comment.
Pull request overview
Stabilizes RGW persistent-topic configuration tests by accounting for queue discovery timing and pacing retries.
Changes:
- Adds a queue-discovery delay before generating events.
- Sets a one-second retry interval for the TTL test.
| # wait for the persistent topic's queue to be discovered and owned by the | ||
| # notification manager before generating events. the manager only refreshes | ||
| # its list of queues every rgw_notification_queue_update_period (30s by | ||
| # default), so a queue created just after a refresh may not start being | ||
| # processed for up to that long. without this wait, events from the create | ||
| # phase can still be sitting in the queue (not yet retried/expired) when the | ||
| # delete phase runs, inflating the entry count and failing the assertions. | ||
| time.sleep(30) |
|
@kchheda3 thanks for taking care of this long standing issue!
|
ff60fe3 to
20d5007
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/test/rgw/bucket_notification/test_bn.py:3650
- This fixed delay does not actually guarantee that the manager has discovered and locked the queue: the refresh coroutine may be delayed by scheduling or RADOS operations, and there is no ownership check before events are generated. The PR's own TTL test result (~9/10 passes) confirms that the test remains flaky. Please wait on an observable ownership/processing condition with a bounded timeout (or add a test hook exposing it) rather than relying on wall-clock sleep.
time.sleep(queue_discovery_period + 5)
the TTL failure is only specific to http manager code and was non trivial change and plus actual ceph code changes, mitigated by adding a sleep in ttl test, additionally i would be surprised if anyone uses http notification in productions, so did not add the tracker. |
agree this is probably non-critical. lets see how annoying thoes intermittent failure are, and open a tracker if we have to... |
|
jenkins test make check arm64 |
test_persistent_topic_configs_max_retries and test_persistent_topic_configs_ttl have been intermittently failing with an inflated entry count (e.g. "20 != 10" or "15 != 10"), where events from the create phase are still in the persistent queue when the delete phase runs. Two independent timing issues are addressed: 1. Queue discovery race. The notification manager refreshes its list of persistent queues once per fixed queues_update_period (a 30s constant in rgw_notify.cc, not a tunable), then still has to lock the queue and start processing before entries begin retrying/expiring. A queue created just after a refresh is not handled until the next cycle, so create-phase events may not have started expiring by the time the test checks the queue. Wait for more than one full period (period + margin) after creating the topic, before generating any events, so discovery is guaranteed to have happened; sleeping exactly one period can still race. 2. Zero retry sleep in the ttl test. Leaving retry_sleep_duration as "None" falls back to rgw_topic_persistency_sleep_duration=0. Since the push endpoint is intentionally unreachable, this makes the manager retry the same events hundreds of times per second, which is wasteful and has been observed to wedge queue processing. Set retry_sleep_duration=1 to pace the retries; expiry is still driven by time_to_live, so the assertions are unchanged. Fixes: https://tracker.ceph.com/issues/71979 Signed-off-by: Krunal Chheda <[email protected]>
20d5007 to
a55e2c1
Compare
|
This PR has been added to main integration testing by anuchaithra started 2026-08-03-05:57. |
pr testing completed and approved by @ivancich . |
Description
test_persistent_topic_configs_max_retriesandtest_persistent_topic_configs_ttlhave been intermittently failing with an inflated persistent-queue entry count (e.g.20 != 10or15 != 10): events from the create phase are still sitting in the queue when the delete phase runs, so the two phases' entries add up.Root cause is timing, in two independent places:
Queue discovery race. The notification manager only refreshes its list of persistent queues every
rgw_notification_queue_update_period(30s by default). A queue created just after a refresh isn't picked up for processing until the next cycle, so the create-phase events may not have started retrying/expiring by the time the test checks the queue. This is the failure reported in the tracker. Fix: wait 30s after creating the topic (before generating any events) so the queue is discovered and owned first.Zero retry sleep in the ttl test. Leaving
retry_sleep_durationas"None"falls back torgw_topic_persistency_sleep_duration=0. Because the push endpoint here is intentionally unreachable, a 0s sleep makes the manager retry the same events hundreds of times per second — wasteful, and observed to wedge queue processing. Fix: setretry_sleep_duration=1to pace the retries; expiry is still driven bytime_to_live, so the assertions are unchanged.Both changes are test-only.
Testing
Looping the affected tests on a vstart cluster:
test_persistent_topic_configs_max_retries: was reproducibly failing (~1 in 16 runs); passes consistently with change (1).test_persistent_topic_configs_ttl: went from ~8/10 failures to ~9/10 passes with change (2).Fixes: https://tracker.ceph.com/issues/71979
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.