]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: Ensure buckets too old to decode a layout have layout logs 43823/head
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 2 Nov 2021 16:46:15 +0000 (12:46 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 5 Nov 2021 17:47:24 +0000 (13:47 -0400)
commit688665623fa71bdb66c0bceded6bbcd3491f0c49
treea0a47879459c8137f61bcb88ee3f794c28d82c0d
parentdd7139c66c1d36da50475ec97d8d6b54b07d1dea
rgw: Ensure buckets too old to decode a layout have layout logs

When decoding `RGWBucketInfo` data from before Pacific, we won't call
`rgw::BucketLayout::decode`, but will instead synthesize the layout
information. This leaves the `rgw::BucketLayout::logs` empty, as the
fallback to populate it only applies to old versions of
`rgw::BucketLayout`.

Add a check at the end of `RGWBUcketInfo::decode` to populate it if
empty.

Fixes: https://tracker.ceph.com/issues/53132
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 3279509127e65314c07963a3e127e926308bd76a)
Fixes: https://tracker.ceph.com/issues/53160
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_common.cc
src/rgw/rgw_dencoder.cc