]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/multisite: Fix issue with parsing replication rules
authorSoumya Koduri <skoduri@redhat.com>
Tue, 16 May 2023 10:10:36 +0000 (15:40 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Tue, 23 May 2023 17:04:26 +0000 (22:34 +0530)
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 570de795721d13ddd6d39e28416b6d6f48477501)

src/rgw/services/svc_bucket_sync_sobj.cc

index c84ebc23f4dba4d745209494ba447adb126132cf..ea3398a3f48c93662e88b838ffcf4e3e77064028 100644 (file)
@@ -293,14 +293,10 @@ static bool diff_sets(std::set<rgw_bucket>& orig_set,
       ++oiter;
       ++niter;
       continue;
-    }
-    while (*oiter < *niter &&
-          oiter != orig_set.end()) {
+    } else if (*oiter < *niter) {
       removed->push_back(*oiter);
       ++oiter;
-    }
-    while (*niter < *oiter
-          && niter != new_set.end()) {
+    } else {
       added->push_back(*niter);
       ++niter;
     }