the returned marker is a bucket name. when bucket names are long, the
response can overflow the 64-byte limit on responses to write operations
with librados::OPERATION_RETURNVEC. this leads to errors like:
> ERROR: could not reset user stats: (75) Value too large for defined data type
however, the client only needs this marker string to resume listing
after a truncated response. if the listing is not truncated, we can omit
the marker to save space
in general, users will have less than MAX_ENTRIES=1000 buckets, so won't
get truncated listings
Fixes: https://tracker.ceph.com/issues/51786
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
5400aab8d92b1260d331e72ae81030424a1e1797)
add_header_stats(&ret.acc_stats, e);
}
- /* try-update marker */
- if(!keys.empty())
- ret.marker = (--keys.cend())->first;
-
if (! ret.truncated) {
buffer::list bl;
header.last_stats_update = op.time;
return rc;
}
+ /* try-update marker */
+ if(!keys.empty())
+ ret.marker = (--keys.cend())->first;
+
/* return partial result */
encode(ret, *out);
return 0;