]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix truncated ListBuckets response. 48559/head
authorJoshua Baergen <jbaergen@digitalocean.com>
Wed, 19 Oct 2022 21:13:12 +0000 (15:13 -0600)
committerJoshua Baergen <jbaergen@digitalocean.com>
Thu, 20 Oct 2022 16:02:12 +0000 (10:02 -0600)
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>
src/rgw/rgw_op.cc

index 4ccd2ceb625525d917b15fa588d5573c67fd4e42..d85d9e51ed2f8ba6c876be308d6a437c8b70fb59 100644 (file)
@@ -2433,6 +2433,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. */