Skip to content

Improve computation of the ETag and checksums#3477

Merged
bbockelm merged 2 commits into
PelicanPlatform:mainfrom
bbockelm:etag-recompute
Jun 15, 2026
Merged

Improve computation of the ETag and checksums#3477
bbockelm merged 2 commits into
PelicanPlatform:mainfrom
bbockelm:etag-recompute

Conversation

@bbockelm

Copy link
Copy Markdown
Collaborator

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 defaults the checksum to crc32c and mixes in the dev / inode into the ETag computation.

Fixes #3476

@bbockelm bbockelm added enhancement New feature or request origin Issue relating to the origin component labels May 26, 2026
bbockelm added 2 commits June 14, 2026 22:32
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.
@bbockelm

Copy link
Copy Markdown
Collaborator Author

Punching this forward as we're short on reviewer time this month ... mostly isolated to the POSIX V2 and cache V2 code.

@bbockelm bbockelm merged commit e1bb6e6 into PelicanPlatform:main Jun 15, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request origin Issue relating to the origin component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address POSIXv2 testing items / Improve ETag and checksum calculations

1 participant