Repository navigation
rgw/notifications: add support for sharded persistent bucket notifications - #64018
Conversation
6b5d766 to
b2bf4d0
Compare
Config Diff Tool Output+ added: rgw_bucket_persistent_notif_num_shards (rgw.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
Hi @yuvalif, have added code for shard creation and deletion based on create topic, delete topic and set topic attributes as discussed. |
|
Hi @yuvalif, have added simple code for enqueuing notification to respective shards as well. |
There was a problem hiding this comment.
i think this is redundant ? am i wrong to assume that an event will always have an object associated with it so object name will res.object_name will never be nullptr
There was a problem hiding this comment.
you should probably store the shard name in the reservation, instead of recalculating it
There was a problem hiding this comment.
we assume dpp is a valid pointer. no need to check
There was a problem hiding this comment.
no need to pass unit64_t as const ref.
also, assuming the number of shards is not too big, you can probably use a uint32 or even uint16
There was a problem hiding this comment.
will convert it to a uint32.
There was a problem hiding this comment.
unlikely to happen, but this won't be called for version < 4
please set the default number of shards in an "else" statement after line 321
There was a problem hiding this comment.
i think that if the conf num of shards is different, we can emit a different log message ("warning")
There was a problem hiding this comment.
i like the idea that you have an internal name generator that is used in all other places, and you don't copy the name creation logic to multiple places.
however, this implementation is pretty inefficient (you create a buch of strings and copy them into the vector)
in c++20 there is the concept of views of ranges, that do lazy evaluation/generation.
you can use these views in a for loop without storing the values in a container.
e.g.
auto names() {
return std::ranges::views::iota(1, shard_count)
| std::ranges::views::transform([&base_name](int i) {
return base_name + std::to_string(i);
});
}
for (const auto& name : names()) {
...
}There was a problem hiding this comment.
understood, will delve into this more and make the change.
There was a problem hiding this comment.
same here. put the shard name in the reservation and use it here
There was a problem hiding this comment.
pleas eremove rgw_bucket_persistent_notif_shard_enable
d0bdf07 to
a824c2b
Compare
6ed67fb to
72306f5
Compare
1909f7f to
c378331
Compare
There was a problem hiding this comment.
Notifications lowercase please.
suggest:
The number of shards is specified by the central config option rgw_bucket_persistent_notif_num_shards.
There was a problem hiding this comment.
There's only one config value, so I think a list is overkill, unless there will be more in the future. Suggest:
Persistent bucket notifications are managed by the following central configuration options:
There was a problem hiding this comment.
A topic might be created by a Ceph upgrade? Or is this a timing thing? Suggest:
.. note:: When a topic is created during a Ceph upgrade, per-key ..
There was a problem hiding this comment.
in an ideal scenario, we wouldn't expect users to create topics during upgrade. however in-case they do, this is something the current design doesn't guarantee.
There was a problem hiding this comment.
Suggest recasting the possessive to be less awkward:
"ERROR: failed to get the shard: " << shard_name << "'s size or the number of entries: "
->
"ERROR: failed to get the size or number of entries for queue shard: " << shard_name <<"
|
/config check ok |
|
rerun of notification tests in teuthology:
|
|
checking the following test: test_persistent_sharded_topic_config_change_kafka |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
ed5077a to
e2858b0
Compare
|
rebased off latest main to resolve merge conflicts. |
e2858b0 to
6b0272b
Compare
|
jenkins make check |
|
jenkins test make check arm64 |
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
|
in latest run only valgrind issues are seen: https://pulpito.ceph.com/yuvalif-2025-09-03_08:33:09-rgw:notifications-wip-adashoka-71677-distro-default-smithi/ |
* sharding is based on hash of bucket_name:object_key * compatible with v1 topics * include tests to cover backward compatibility and mixed cluster Signed-off-by: Adarsh <[email protected]>
6b0272b to
8c25005
Compare
|
jenkins test make check |
3 similar comments
|
jenkins test make check |
|
jenkins test make check |
|
jenkins test make check |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
|
@yuriw was this passing rgw regression in teuthology? |
This PR contains changes to add support for sharded persistent bucket notifications.
Fixes: https://tracker.ceph.com/issues/71677
Signed-off-by: Adarsh Ashokan [email protected]
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 Definition