Skip to content

feat(storage/transfermanager): checksum full object downloads#10569

Merged
BrennaEpp merged 4 commits intogoogleapis:mainfrom
BrennaEpp:crc
Jul 30, 2024
Merged

feat(storage/transfermanager): checksum full object downloads#10569
BrennaEpp merged 4 commits intogoogleapis:mainfrom
BrennaEpp:crc

Conversation

@BrennaEpp
Copy link
Contributor

No description provided.

@BrennaEpp BrennaEpp requested a review from a team as a code owner July 21, 2024 03:27
@BrennaEpp BrennaEpp requested a review from a team July 21, 2024 03:27
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jul 21, 2024
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

In general looks really good, a few minor questions/comments. Also, could you add a note to the docs to indicate under what circumstances checksumming will be performed?


// maxChecksumZeroArraySize is the maximum amount of memory to allocate for
// updating the checksum. A larger size will occupy more memory but will require
// more updates when computing the crc32c of a full object.
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems wrong, I would imagine larger means fewer updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, I messed up that wording.


// joinCRC32C pieces together the initial checksum with the orderedChecksums
// provided to calculate the checksum of the whole.
func joinCRC32C(initialChecksum uint32, orderedChecksums []crc32cPiece) uint32 {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems surprising that this isn't available in hash/crc32 or elsewhere in a standard library, but I assume you looked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there was a feature request for it a while back but they considered it not common enough a use-case to include in the standard library: golang/go#12297

@BrennaEpp BrennaEpp requested a review from tritone July 30, 2024 00:01
@BrennaEpp BrennaEpp enabled auto-merge (squash) July 30, 2024 18:48
@BrennaEpp BrennaEpp merged commit c366c90 into googleapis:main Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments