Repository navigation
fix: continue parquet footer warming after metadata-only HEAD - #239
Merged
Merged
Conversation
Signed-off-by: Perfloop Agent <[email protected]>
|
Signed-off-by: Perfloop Agent <[email protected]>
perfloop
Bot
force-pushed
the
perfloop-pr-open-j54y2swdnw
branch
from
October 2, 2026 01:14
dc2e2c5 to
20415df
Compare
ovaistariq
approved these changes
Oct 21, 2026
|
🎉 This PR is included in version 1.22.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The change
A successful, non-replayed multipart completion can schedule metadata-on-write HEAD and Parquet footer warming together. For co-enabled
.parquetwrites, TAG now passes the completion ETag to the detached footer worker. If a metadata-only entry matching that ETag and block layout is already visible, the worker validates the suffix response and fills missing footer blocks without rewriting the entry. If the suffix is unsafe or mismatched, no footer blocks are published; when the guarded HEAD succeeds, its metadata remains available for ordinary range reads. The completion response still does not wait for either warm. The README and Parquet guide describe this behavior and the remaining cold-read window. No public API or configuration changes were added.Tests
TestServer_CompleteMultipartUploadWarmsFooterForFirstOpenandTestServer_CompleteMultipartUploadFooterFirstStillWarmsforce both worker orders.TestServer_CompleteMultipartUploadSkipsFooterWhenVersionLookupFails,TestServer_CompleteMultipartUploadKeepsHeadOnSuffixETagMismatch,TestServer_CompleteMultipartUploadKeepsHeadWhenSuffixIsNotPartial, andTestServer_DeleteDuringFooterFetchDoesNotRepublishMetadatacover fallback conditions and deletion during a block fetch under legacy and CAS coordination. The completion request helper now sends request errors through the result channel so the test goroutine reports the request failure instead of a synchronization timeout.The benchmark uses the registered handlers with a sparse document-shaped 300 MiB object, 3.5 MB footer, and 1 MiB blocks. It forces HEAD-first ordering, waits for warming to finish, then times the trailer and metadata range requests against a local origin with a fixed 5 ms range-response delay. Read-triggered prefetch remains enabled and is counted separately, so the reported origin work covers foreground first-open work, not total transfer. Footer bytes are moved before the open, not eliminated; an open before warming completes can still fetch missing blocks. This setup does not estimate production latency, HEAD-first frequency, or deployment adoption.
The measurement command is
bash -o pipefail -c "\"$PERFLOOP_BUILD_OUTPUT_DIR/bench.test\" -test.bench=\"^BenchmarkParquetFirstOpenAfterMultipartWriteWarm$\" -test.run=\"^$\" -test.count=1 -test.benchtime=20x | perfloop-go-bench-json \"BenchmarkParquetFirstOpenAfterMultipartWriteWarm\" \"ns/op\" \"foreground_origin_gets/op\" \"foreground_origin_bytes/op\"".On workload
HEAD-first Parquet open after multipart completion (300 MiB object, 3.5 MB footer, 1 MiB blocks), median metricforeground_origin_gets/opchanged from 1 to 0; paired median delta -1 (-100% of baseline; at least 19/20 confidence interval -1 to -1 from 10 pairs).On workload
HEAD-first Parquet open after multipart completion (300 MiB object, 3.5 MB footer, 1 MiB blocks), median metricforeground_origin_bytes/opchanged from 262144 to 0; paired median delta -262144 (-100% of baseline; at least 19/20 confidence interval -262144 to -262144 from 10 pairs).The following checks passed:
make lint-ci,bash -o pipefail -c "TAR_OPTIONS=--no-same-owner make build",bash -o pipefail -c "TAR_OPTIONS=--no-same-owner make test",bash -o pipefail -c "TAR_OPTIONS=--no-same-owner make test-race", andbash -o pipefail -c "TAR_OPTIONS=--no-same-owner make test-coverage".Target CI also runs the integration step in
Test / test,S3 Compatibility Tests / s3-compat-tests (default, tiered),S3 Compatibility Tests (Cluster) / s3-compat-tests-cluster (default),Lint PR Title / lint, andCLA Assistant / cla.Generated by Perfloop. Measurements and checks.
Note
Medium Risk
Changes multipart post-write cache warming and metadata/block publication ordering; mistakes could skip warming or publish blocks under wrong ETags, though guards and extensive tests target those paths.
Overview
Multipart completion with
cache.meta_on_writeandcache.parquet_optimizationnow passes the completion ETag into the detached footer warm. The worker no longer bails out just because a metadata-only HEAD entry is already visible: when that entry matches the write ETag and block layout, it validates the suffix-range response and fills missing footer blocks without rewriting metadata; unsafe or mismatched suffix responses leave the HEAD entry intact and skip block publication.HandleCompleteMultipartUploadwires this only for co-enabled.parquetkeys; PUT/copy paths still call the ETag-less warm helper. README anddocs/parquet-optimization.mddescribe the independent HEAD/footer workers and the race window before warm finishes.Large handler integration tests (legacy and CAS) cover success, footer-before-HEAD ordering, token lookup failure, suffix ETag/status guards, delete-during-fetch, and a benchmark for first-open origin GET/byte counts after warm.
Reviewed by Cursor Bugbot for commit 20415df. Bugbot is set up for automated code reviews on this repo. Configure here.