]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix multipart get part when count==1 58288/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Jun 2024 14:52:37 +0000 (10:52 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 26 Jun 2024 14:52:39 +0000 (10:52 -0400)
commit562e0ce9baac53e714d91a46b4f0114b82827026
treecf008c76d7b7e70d9e1b04ce1c6f6241e5eb1876
parentbdbef7329dd69333232cdfe128d29d57097eff5d
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>
src/rgw/driver/rados/rgw_rados.cc