From: Yehuda Sadeh Date: Tue, 3 Dec 2019 02:54:35 +0000 (-0800) Subject: rgw: pipe map in pipe_set should be multimap X-Git-Tag: v15.1.0~22^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=873d530dabeb8c481a22aba5b9fe3bab7820a033;p=ceph.git 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 --- diff --git a/src/rgw/rgw_bucket_sync.cc b/src/rgw/rgw_bucket_sync.cc index d9a01d1274c4..b62839c0c789 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 08860fcde066..3e541044947e 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;