]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW/multisite/RGWListRemoteBucketCR: clear reused bucket_list_result to avoid stale...
authorOguzhan Ozmen <oozmen@bloomberg.net>
Tue, 11 Nov 2025 16:16:19 +0000 (16:16 +0000)
committerOguzhan Ozmen <oozmen@bloomberg.net>
Thu, 19 Mar 2026 19:57:12 +0000 (19:57 +0000)
RGWBucketFullSyncCR could spin indefinitely when the source bucket was
already deleted. The coroutine reused a bucket_list_result member, and
RGWListRemoteBucketCR populated it without clearing prior state. Stale
entries/is_truncated from a previous iteration caused the loop to
continue even after the bucket no longer existed.

Fix by clearing the provided bucket_list_result at the start of
RGWListRemoteBucketCR (constructor), ensuring each listing starts from a
clean state and reflects the current remote bucket contents.

This prevents the infinite loop and returns correct results when the
bucket has been deleted.

Fixes: https://tracker.ceph.com/issues/73799
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
(cherry picked from commit c8a66a96e913b8a112ef26bf3399ede861686d23)

src/rgw/driver/rados/rgw_data_sync.cc

index d4e8c7f3f02b55f117f44f8a58e56fa783139c01..a5303c4d6e27356de403bbbcf6e4803e633fb640 100644 (file)
@@ -4061,7 +4061,9 @@ public:
   RGWListRemoteBucketCR(RGWDataSyncCtx *_sc, const rgw_bucket_shard& bs,
                         rgw_obj_key& _marker_position, bucket_list_result *_result)
     : RGWCoroutine(_sc->cct), sc(_sc), sync_env(_sc->env), bs(bs),
-      marker_position(_marker_position), result(_result) {}
+      marker_position(_marker_position), result(_result) {
+        result->reset_entries();
+      }
 
   int operate(const DoutPrefixProvider *dpp) override {
     reenter(this) {