Repository navigation
rgw/notify: make persistent topic ownership timeout configurable - #70956
Merged
Merged
Conversation
Config Diff Tool Output+ added: rgw_topic_ownership_update_period (rgw.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
akkki007
force-pushed
the
wip-rgw-notify-ownership-timeout
branch
from
August 11, 2026 03:49
faf7d01 to
5968e36
Compare
yuvalif
reviewed
Aug 11, 2026
yuvalif
reviewed
Aug 11, 2026
The queue list refresh period was hardcoded to 30s, which also fixed the topic ownership timeout at 90s. Read the period from a new config option on each iteration of the ownership loop so it can be lowered for faster failover and for testing. The ownership timeout is still computed as three times the period, and both values are taken from the same read so the renewal cadence always stays shorter than the lock duration. Ownership of an existing persistent topic queue is only affected on its next renewal. Fixes: https://tracker.ceph.com/issues/78727 Signed-off-by: Akshay Nazare <[email protected]>
akkki007
force-pushed
the
wip-rgw-notify-ownership-timeout
branch
from
August 11, 2026 07:19
5968e36 to
1450cfb
Compare
Contributor
|
/config check ok |
yuvalif
self-requested a review
August 11, 2026 08:50
yuvalif
approved these changes
Aug 11, 2026
Contributor
|
jenkins test make check |
Contributor
|
jenkins test make check arm64 |
Contributor
|
jenkins test signed |
Contributor
|
jenkins test submodules |
Contributor
|
pr testing completed and approved by @ivancich , more details in : https://tracker.ceph.com/issues/79449 |
4 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: https://tracker.ceph.com/issues/78727
Problem
In
rgw_notify.ccthe queue list refresh period was a hardcoded 30s constant, and the ownership timeout of a persistent topic queue was derived from it as30 * 3 = 90s. Neither could be changed, so failover of a persistent topic between gateways always took up to ~90s, and there was no way to shorten it for testing.Fix
Expose the period as a new config option,
rgw_topic_ownership_update_period, and keep the ownership timeout at three times that value. Per the tracker discussion this is option (a): a single option, with the other value computed as before.The option is read once per iteration of the ownership loop rather than at startup, so
next_check_timeand the lock duration always come from the same read. That keeps the renewal cadence shorter than the lock duration regardless of what the option does between iterations.On the concern about lowering the value moving ownership unnecessarily:
cls_lock.cc:85trims lockers by comparing the stored expiration against the OSD clock; the caller's duration is only used to compute a new expiration. An RGW that computes9*3=27simply getsEBUSYuntil the stored expiry passes.next_check_timeis only recomputed in the branch that does the work, so the owner keeps its longer expiry until its next scheduled check and then writes both new values together. The tradeoff is that a lowered value takes effect after up to one old period.maxis 3600 because the value is multiplied by three into astd::chrono::seconds, so an unbounded option would overflowint64.Testing
Manual test on vstart with 2 RGWs and one persistent topic (11 queue shards):
kill -9of the owning gateway0,3601Added
test_persistent_topic_ownership_period_change_http, which lowers the option at runtime and checks that delivery on an already-owned queue is not interrupted. It runs with a single gateway, so it covers the config change and not failover itself.The automated failover test is left for a separate PR as agreed on the tracker.
test_persistent_gateways_recoveryandtest_persistent_multiple_gatewaysare currentlynot_implementedstubs and are where it belongs.Open for review
minis 1, which allows a 3s lock duration against a 1s poll interval, so a higher floor may be safer.max: 3600and the option name are both suggestions.Checklist
Show available Jenkins commands
jenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins test ceph-volume alljenkins test windowsjenkins test rook e2eYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.