Improve computation of the ETag and checksums#3477
Merged
Conversation
When Matyas was reviewing the POSIXv2 backend, we saw scary-looking
behavior around the ETag and checksums:
1. The checksums defaulted to MD5 whereas we use crc32c by default
elsewhere.
2. The ETags all looked the same. This appears because ETag is
based only on mtime / size which were the same for all our test
files.
This default sthe checksum to crc32c and mixes in the dev / inode
into the ETag computation.
If the cache receives a transfer error from the origin while streaming (or a checksum in the trailer that does not match what it got), make sure we pass along an error to the client as well. If this is a partial read, do *not* wait for the full object download to complete. The original version accidentally implemented a full wait so there's a regression test to prove that the partial download from the cache does not depend on the origin sending the full object.
Collaborator
Author
|
Punching this forward as we're short on reviewer time this month ... mostly isolated to the POSIX V2 and cache V2 code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Matyas was reviewing the POSIXv2 backend, we saw scary-looking behavior around the ETag and checksums:
This defaults the checksum to crc32c and mixes in the dev / inode into the ETag computation.
Fixes #3476