Skip to content

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

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

rgw: fix multipart get part when count==1#58288
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-66705

Conversation

@cbodley
Copy link
Copy Markdown
Contributor

@cbodley cbodley commented Jun 26, 2024

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 <cbodley@redhat.com>
@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Jun 26, 2024

@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

Copy link
Copy Markdown
Contributor

@mattbenjamin mattbenjamin left a comment

Choose a reason for hiding this comment

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

lgtm

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Jul 2, 2024

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Jul 2, 2024

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

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Jul 5, 2024

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%]

@cbodley cbodley merged commit 0daa092 into ceph:main Jul 5, 2024
@cbodley cbodley deleted the wip-66705 branch July 5, 2024 14:50
NitzanMordhai pushed a commit to NitzanMordhai/ceph that referenced this pull request Aug 1, 2024
rgw: fix multipart get part when count==1

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
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