summaryrefslogtreecommitdiffstats
path: root/src/rgw
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@users.noreply.github.com>2024-09-26 15:07:04 +0200
committerGitHub <noreply@github.com>2024-09-26 15:07:04 +0200
commit48b3086f164f887da365ffb09cb3f4d7f6ca0ca1 (patch)
treed66113718454037eb79a21eb4899b3fb901d17af /src/rgw
parentMerge pull request #59981 from guits/fix_68231 (diff)
parentrgw/notify: add copy ctor to token waiter (diff)
downloadceph-48b3086f164f887da365ffb09cb3f4d7f6ca0ca1.tar.xz
ceph-48b3086f164f887da365ffb09cb3f4d7f6ca0ca1.zip
Merge pull request #59244 from cbodley/wip-rgw-notification-token-waiter
rgw/notify: process_queue() constructs wait tokens when spawning Reviewed-by: Yuval Lifshitz <ylifshit@ibm.com>
Diffstat (limited to 'src/rgw')
-rw-r--r--src/rgw/driver/rados/rgw_notify.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rgw/driver/rados/rgw_notify.cc b/src/rgw/driver/rados/rgw_notify.cc
index 6fdc4b91677..7b31fd72bd4 100644
--- a/src/rgw/driver/rados/rgw_notify.cc
+++ b/src/rgw/driver/rados/rgw_notify.cc
@@ -151,6 +151,9 @@ private:
struct token {
tokens_waiter& waiter;
+ token(const token& other) : waiter(other.waiter) {
+ ++waiter.pending_tokens;
+ }
token(tokens_waiter& _waiter) : waiter(_waiter) {
++waiter.pending_tokens;
}
@@ -469,11 +472,10 @@ private:
entries_persistency_tracker& notifs_persistency_tracker = topics_persistency_tracker[queue_name];
boost::asio::spawn(yield, std::allocator_arg, make_stack_allocator(),
[this, &notifs_persistency_tracker, &queue_name, entry_idx,
- total_entries, &end_marker, &remove_entries, &has_error, &waiter,
- &entry, &needs_migration_vector,
+ total_entries, &end_marker, &remove_entries, &has_error,
+ token = waiter.make_token(), &entry, &needs_migration_vector,
push_endpoint = push_endpoint.get(),
&topic_info](boost::asio::yield_context yield) {
- const auto token = waiter.make_token();
auto& persistency_tracker = notifs_persistency_tracker[entry.marker];
auto result =
process_entry(this->get_cct()->_conf, persistency_tracker,