]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: fix multipart get part when count==1
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Jun 2024 14:52:37 +0000 (10:52 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 14 Apr 2025 12:55:54 +0000 (08:55 -0400)
commit8ec0a955380701c45ed7bbd87110844846a51413
tree8c89c57e3945bd84815725d0d07f5a0166243519
parentb2db3bbc8ceafc3572781a3fe81b1d6a1570c5f1
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