]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix truncated ListBuckets response. 49525/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:45:28 +0000 (10:45 -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 0fa2ffc85aef9d3d324787a08163af1a898add92..6068082c23573483ccf1c08b9598dea1f59e6ca6 100644 (file)
@@ -2397,6 +2397,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. */