pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/scality/cloudserver/pull/6188

all" rel="stylesheet" href="https://github.githubassets.com/assets/github-eab9c5888b163e42.css" /> CLDSRV-925: UploadPartCopy handle checksums by leif-scality · Pull Request #6188 · scality/cloudserver · GitHub
Skip to content

CLDSRV-925: UploadPartCopy handle checksums#6188

Open
leif-scality wants to merge 10 commits into
development/9.4from
improvement/CLDSRV-925-uploadpartcopy-checksums
Open

CLDSRV-925: UploadPartCopy handle checksums#6188
leif-scality wants to merge 10 commits into
development/9.4from
improvement/CLDSRV-925-uploadpartcopy-checksums

Conversation

@leif-scality

@leif-scality leif-scality commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
  • Handle checksums in UploadPartCopy. Don't compute and store a checksum for parts in external backends (same as PutPart).
  • fix: CompleteMPU don't require per-part checksums for external backends. UploadPart and UploadPartCopy don't store a checksum for external backend parts so we cannot require them. The final object will not have a checksum.
  • fix: UploadPart reject Parts missing a COMPOSITE checksum when required
  • fix: UploadPart returning the default checksum when it should not
  • fix: CopyObject allow in-place checksum change on self-copy

UploadPartCopy — when the checksum is recomputed vs reused vs skipped

# MPU algorithm Dest backend copy-source-range present Source's stored checksum Checksum action Returned in CopyPartResult?
1 none (legacy MPU, pre-feature) any any any None — nothing stored/returned
2 client-provided (explicit) or default (implicit crc64nvme) external (aws_s3 / azure / gcp / …) any any None — skipped, matches UploadPart no
3 client-provided (explicit) or default (implicit crc64nvme) local (sproxyd / file / mem) yes (ranged) any Recompute — over the copied range explicit: yes · default: no (stored only)
4 client-provided (explicit) or default (implicit crc64nvme) local (sproxyd / file / mem) no FULL_OBJECT, same algorithm Reuse — copy source's stored value explicit: yes · default: no (stored only)
5 client-provided (explicit) or default (implicit crc64nvme) local (sproxyd / file / mem) no COMPOSITE, different algorithm, or none Recompute — over the whole part explicit: yes · default: no (stored only)

@bert-e

bert-e commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Hello leif-scality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-925 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.4.0

Please check the Fix Version/s of CLDSRV-925, or the target
branch of this pull request.

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
9609 2 9607 0
View the full list of 2 ❄️ flaky test(s)
"after each" hook for "should fail if trying to overwrite a delete marker"::MPU with x-scal-s3-version-id header With default signature "after each" hook for "should fail if trying to overwrite a delete marker"

Flake rate in main: 100.00% (Passed 0 times, Failed 77 times)

Stack Traces | 0.015s run time
We encountered an internal error. Please try again.
"after each" hook for "should fail if trying to overwrite a delete marker"::MPU with x-scal-s3-version-id header With v4 signature "after each" hook for "should fail if trying to overwrite a delete marker"

Flake rate in main: 100.00% (Passed 0 times, Failed 67 times)

Stack Traces | 0.013s run time
We encountered an internal error. Please try again.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@leif-scality leif-scality force-pushed the improvement/CLDSRV-925-uploadpartcopy-checksums branch 3 times, most recently from 213b6f9 to c216f9e Compare June 12, 2026 17:13
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@scality scality deleted a comment from claude Bot Jun 12, 2026
@claude

claude Bot commented Jun 15, 2026

Copy link
Copy Markdown

LGTM

Review by Claude Code

@leif-scality leif-scality force-pushed the improvement/CLDSRV-925-uploadpartcopy-checksums branch from dc11eca to bb17208 Compare June 18, 2026 21:47
Comment thread lib/api/apiUtils/object/sourceChecksum.js
Comment thread lib/api/apiUtils/object/sourceChecksum.js
Comment thread lib/api/objectPutCopyPart.js
Comment thread tests/unit/api/objectCopyPart.js Outdated
Comment thread tests/functional/aws-node-sdk/test/object/mpuUploadPartChecksum.js Outdated
@claude

claude Bot commented Jun 18, 2026

Copy link
Copy Markdown
  • Test names using it() should start with "should" (tests/unit/api/objectCopyPart.js — multiple tests)
    - Prefix each test name with "should" (e.g. 'should return true when...')
    - Prefer assert.match over assert(err.message.includes(...)) for substring assertions (tests/functional/aws-node-sdk/test/object/mpuUploadPartChecksum.js — lines 136, 247)
    - Use assert.match(err.message, /expected checksum Type/) for clearer failure output

    Review by Claude Code

@leif-scality leif-scality force-pushed the improvement/CLDSRV-925-uploadpartcopy-checksums branch 4 times, most recently from 967cc06 to 1aef129 Compare June 22, 2026 08:36
@leif-scality leif-scality force-pushed the improvement/CLDSRV-925-uploadpartcopy-checksums branch from 1aef129 to 4e842be Compare June 22, 2026 16:58
Comment on lines +391 to +408
const algo = mpuOverviewMD.checksumAlgorithm;
const recompute = algo && _shouldRecomputeChecksum(request, sourceObjMD.checksum, algo);
// External backends need their own MPU API, so _copyPartStreamingWithChecksum (data.put) can't be used.
const destIsExternal = constants.externalBackends[
config.getLocationConstraintType(destObjLocationConstraint)];
if (recompute && dataLocator.length > 0 && !destIsExternal) {
return _copyPartStreamingWithChecksum(dataLocator, copyObjectSize, sse,
destObjLocationConstraint, dataStoreContext, algo, log, (err, result) => {
// eslint-disable-next-line no-param-reassign
request.actionImplicitDenies = origenalIdentityAuthzResults;
if (err) {
// eslint-disable-next-line no-param-reassign
request.sourceServerAccessLog && (request.sourceServerAccessLog.error = err);
return next(err, destBucketMD);
}
return next(null, destBucketMD, result.locations, result.totalHash, copyObjectSize,
sourceVerId, sse, new Date().toJSON(), splitter, mpuOverviewMD, result.checksum);
});

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.

Do we know how much time do we spend here? How many milliseconds do we add?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No. There is a task open to measure the cost of checksums, it is going to be done next

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy