From 873d530dabeb8c481a22aba5b9fe3bab7820a033 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 2 Dec 2019 18:54:35 -0800 Subject: [PATCH] rgw: pipe map in pipe_set should be multimap Can hold multiple entries for the same pipe id (if flow defines more than a single entry). Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_bucket_sync.cc | 2 +- src/rgw/rgw_bucket_sync.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_bucket_sync.cc b/src/rgw/rgw_bucket_sync.cc index d9a01d1274c..b62839c0c78 100644 --- a/src/rgw/rgw_bucket_sync.cc +++ b/src/rgw/rgw_bucket_sync.cc @@ -459,7 +459,7 @@ RGWBucketSyncFlowManager::pipe_rules::prefix_map_t::const_iterator RGWBucketSync } void RGWBucketSyncFlowManager::pipe_set::insert(const rgw_sync_bucket_pipe& pipe) { - pipe_map[pipe.id] = pipe; + pipe_map.insert(make_pair(pipe.id, pipe)); auto& rules_ref = rules[endpoints_pair(pipe)]; diff --git a/src/rgw/rgw_bucket_sync.h b/src/rgw/rgw_bucket_sync.h index 08860fcde06..3e541044947 100644 --- a/src/rgw/rgw_bucket_sync.h +++ b/src/rgw/rgw_bucket_sync.h @@ -208,7 +208,7 @@ public: struct pipe_set { std::map rules; - std::map pipe_map; + std::multimap pipe_map; std::set handlers; -- 2.39.5