Conversation
Loading one deletion vector issued two or three S3 `HEAD` requests against the same object. `loadDeletionVector` already calls `getObjectMetadata` for the Puffin file to read its etag for the `PuffinFilesCache` key, but then passes only the path down: `readFooterBlobs` and `loadDeletionVectorUncached` each build a fresh `RelativePathWithMetadata` with empty metadata, and `createReadBuffer` fills it in with another `getObjectMetadata` for every buffer it opens. Thread the already-fetched metadata into both helpers instead. `createReadBuffer` issues its own request only when `RelativePathWithMetadata::metadata` is empty, so seeding it removes the redundant requests without changing which bytes are read. The two call sites that run before the etag fetch keep passing `std::nullopt` and behave as before. On a lake scan with cold deletion vectors this is the dominant cost: a profile of one such query recorded 5706 `S3HeadObject` requests against 2833 `PuffinFilesRead`, with about 94 seconds spent in `HEAD` alone. Reusing a single metadata snapshot for every read of the same Puffin file is also more coherent than re-fetching it. Iceberg data and delete files are immutable, so the separate requests could only ever have observed the same object. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
30 tasks
30 tasks
This branch has not been deployed
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Reduce number of Puffin file HEAD requests
Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: