]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: pipe map in pipe_set should be multimap
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 3 Dec 2019 02:54:35 +0000 (18:54 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 28 Jan 2020 18:20:39 +0000 (10:20 -0800)
Can hold multiple entries for the same pipe id (if flow defines
more than a single entry).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_bucket_sync.cc
src/rgw/rgw_bucket_sync.h

index d9a01d1274c4faa28843c57ff0096078c5b712b6..b62839c0c7899e7029014f701785288dc27463df 100644 (file)
@@ -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)];
 
index 08860fcde06633949dd4ca966b8f68de436488c5..3e541044947e498803cc8741f4dcc8de3d96fd0a 100644 (file)
@@ -208,7 +208,7 @@ public:
 
   struct pipe_set {
     std::map<endpoints_pair, pipe_rules_ref> rules;
-    std::map<string, rgw_sync_bucket_pipe> pipe_map;
+    std::multimap<string, rgw_sync_bucket_pipe> pipe_map;
 
     std::set<pipe_handler> handlers;