]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw_cksum: permit fallback to checksum-type from create-multipart, in upload-part
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 12 Oct 2024 17:49:29 +0000 (13:49 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 8 Jan 2025 00:17:16 +0000 (19:17 -0500)
commitbac02fc435c251b18095653a3141b1375796d23f
tree09cff4d9d80af51c42056dfc5fc337ff8e817e05
parent5c4d5942835f3485558617903990fabee11c625e
rgw_cksum: permit fallback to checksum-type from create-multipart, in upload-part

There appear to be workloads that provide a checksum algorithm in
create-multipart-upload, but do not provide (what must be) the
corresponding algorithm when uploading the parts.  (complete-multipart-upload
has no checksum argument, the value is implicit.)

This behavior is inconsistent with at least some SDKs, but it is
possibly accepted behavior in AWS S3, and is not logically necessary,
since the originally supplied checksum type is already known.

Therefore, change the behavior of upload-part to fall back to a
checksum type that was sent with the corresponding create-multipart-upload
request, if one is present, rather than failing with InvalidRequest.

Fixes: https://tracker.ceph.com/issues/68513
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 6b487a4c6dbadf3f470c8b12ddd5f2521c6920c6)
src/rgw/rgw_cksum_pipe.cc
src/rgw/rgw_cksum_pipe.h
src/rgw/rgw_op.cc
src/rgw/rgw_op.h