]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix multipart get part when count==1 58443/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Jun 2024 14:52:37 +0000 (10:52 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 5 Jul 2024 15:18:58 +0000 (11:18 -0400)
commite49778e73e60defeccfcb603d55fe5df501b34f3
tree5f4e2afef6b50e2c1e061705d9bbcb8b04e9367b
parentbecc0ba5fa51969f9db50576abf5f1cfef041413
rgw: fix multipart get part when count==1

the RGWObjManifest for multipart uploads is subtly different when
there's only a single part. in that case, get_cur_part_id() for the
final rule returns 1 where it otherwise returns (parts_count + 1)

this caused two problems:
* we returned a parts_count of 0 instead 1, and
* the do-while loop got stuck in an infinite loop expecting the last
  rule's part id to be higher than the requested part id

Fixes: https://tracker.ceph.com/issues/66705
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 562e0ce9baac53e714d91a46b4f0114b82827026)
src/rgw/driver/rados/rgw_rados.cc