]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix truncated ListBuckets response. 49526/head
authorJoshua Baergen <jbaergen@digitalocean.com>
Wed, 19 Oct 2022 21:13:12 +0000 (15:13 -0600)
committerDaniel Gryniewicz <dang@redhat.com>
Tue, 20 Dec 2022 15:46:51 +0000 (10:46 -0500)
Commit 54b470facffe8251dc37b2020e771d4d061cb2ae caused s3:ListBuckets to
return a maximum of 1000 buckets by default as it removed the truncation
detection from this code. We can fix this by simply setting
RGWListBuckets::is_truncated after querying for each batch of buckets.

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
(cherry picked from commit 4bf05121407f2108152379bb3f92d1ecbd730ea3)

src/rgw/rgw_op.cc

index cc3ff80845d35f495f216d566c10d05be69b9d59..b120a8c2d05ef2bc48bd0404b16397fafe528a90 100644 (file)
@@ -2465,6 +2465,8 @@ void RGWListBuckets::execute(optional_yield y)
       break;
     }
 
+    is_truncated = buckets.is_truncated();
+
     /* We need to have stats for all our policies - even if a given policy
      * isn't actually used in a given account. In such situation its usage
      * stats would be simply full of zeros. */