Skip to content

rgw: fix multipart get part when count==1 - #58288

Merged
cbodley merged 1 commit into
ceph:mainfrom
cbodley:wip-66705
Jul 5, 2024
Merged

cbodley merged 1 commit into
ceph:mainfrom
cbodley:wip-66705

Conversation

@cbodley

@cbodley cbodley commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

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 for the 'get part' feature from #50148:

  • 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

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

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 <[email protected]>
@cbodley

cbodley commented Jun 26, 2024

Copy link
Copy Markdown
Contributor Author

@mattbenjamin you discovered this issue in #55076 and worked around it with:

params.parts_count = (cur_part_id == 1) ? 1 : cur_part_id - 1;

test case in ceph/s3-tests#570

@mattbenjamin mattbenjamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cbodley

cbodley commented Jul 2, 2024

Copy link
Copy Markdown
Contributor Author

@cbodley

cbodley commented Jul 2, 2024

Copy link
Copy Markdown
Contributor Author

oops, qa didn't include the test case from ceph/s3-tests#570

@cbodley

cbodley commented Jul 5, 2024

Copy link
Copy Markdown
Contributor Author

passed qa in https://pulpito.ceph.com/cbodley-2024-07-03_01:53:26-rgw-wip-cbodley-testing-distro-default-smithi/ with rerun https://pulpito.ceph.com/cbodley-2024-07-04_21:53:21-rgw-wip-cbodley-testing-distro-default-smithi/

2024-07-05T03:55:25.885 INFO:teuthology.orchestra.run.smithi081.stdout:s3tests_boto3/functional/test_s3.py::test_multipart_get_part PASSED [ 68%]
2024-07-05T03:55:29.729 INFO:teuthology.orchestra.run.smithi081.stdout:s3tests_boto3/functional/test_s3.py::test_multipart_single_get_part PASSED [ 69%]
2024-07-05T03:55:30.980 INFO:teuthology.orchestra.run.smithi081.stdout:s3tests_boto3/functional/test_s3.py::test_non_multipart_get_part PASSED [ 69%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants