Repository navigation
fix(proxy): bound read-triggered Parquet footer scans - #237
Merged
Merged
Conversation
|
perfloop
Bot
force-pushed
the
perfloop-pr-open-vcgmhnrgzk
branch
from
September 27, 2026 21:34
9304b0c to
3b2e486
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.
Read-triggered Parquet footer scans now take one of 32 nonblocking slots per service before a background marker or worker is created. When the limit is full, the read trigger is shed without a cooldown and can retry on a later tail read. Duplicate triggers release their spare slot; write-triggered warming remains separate. Transient trailer-cache and populate failures remain retryable, while stable invalid trailers still start the cooldown. The foreground Range response remains unchanged.
The new
tag_cache_parquet_footer_prefetch_shed_totalcounts eligible read-trigger attempts refused by the scan limit. It signals admission pressure, not the number of distinct footer samples omitted: admission precedes version coalescing, so a refused attempt can be for a version another scan is already handling. The metrics and Parquet guides explain this alongside the footer-size histogram.The controlled workload served distinct
HandleGetObjecttail Range GETs for 64 MiB objects with 64 KiB blocks, cached tails, ~1.25% footers, and a loopback gRPC peer held 10 ms on footer-presence probes. Each timed operation ran ten 16/32/64-offer rounds; ten baseline/Candidate pairs used GOMAXPROCS=4. At 64 offers, peak live cache-peer Get streams fell from 64 to 32 (paired median reduction 32; 95% interval 32–32); the 16- and 32-offer controls stayed at 16 and 32.ns/opmedians were 590,400,811.5 and 550,440,353, with a paired median reduction of 41,810,148 ns/op (95% interval 27,138,715–47,231,306); the no-regression guard passed. The timer includes the artificial stalls and scan drain, so it is not foreground request latency or production queue depth. Separate single-run foreground p99 diagnostics were 276,877 ns and 122,182 ns; no p99 bound is claimed.The admission tests cover global shedding and retry, duplicate permit release, transient versus stable trailer results, and write warming.
TestMaybePrefetchParquetFooter_StreamedTriggerShedsBeforeTrailerReadverifies the new counter while ensuring a declined streamed trigger still performs no cache read or worker start.make lint-ci,make build,make test,make test-integration,make test-race, andmake test-coveragepassed.On the previous PR head, the default S3 compatibility job passed
make s3-testsbut failed atmake test-sdk; its log was unavailable here, so the failing SDK test is unknown. This sandbox has no AWS credentials or local TAG endpoint and could not run those external checks. Target CI should rerun both commands on this revision.Checks: 6 passed.
Generated by Perfloop. Measurements and checks. Reproduce this comparison (tenant access required).
Note
Medium Risk
Changes background Parquet prefetch admission and cooldown on a hot cache path; foreground Range responses are unchanged, but load shedding can defer metadata warming under burst tail reads.
Overview
Read-triggered Parquet footer prefetch now uses a service-wide cap of 32 concurrent scans. Each tail read must take a nonblocking slot before a background marker or goroutine is created; when the limit is full the trigger is shed (no trailer read, no cooldown) and can retry on a later read. Duplicate same-version triggers release the spare permit; write-time footer warming stays on its own path.
Adds
tag_cache_parquet_footer_prefetch_shed_totaland tightenstag_cache_parquet_footer_bytessemantics: the histogram only reflects admitted read scans and write warms, so saturation can skew the sample. Docs inmetrics.mdandparquet-optimization.mddescribe the limit and how to interpret shedding.Cooldown now distinguishes stable negative trailers (cool down) from transient cache read or populate failures (remain retryable).
parquetFooterLengthreturns acompleteflag to drive that behavior.New admission tests cover global shedding/retry, duplicate slot release, transient vs stable trailer handling, shed-before-read (no cache I/O), and write warm bypassing the read limit.
Reviewed by Cursor Bugbot for commit 3b2e486. Bugbot is set up for automated code reviews on this repo. Configure here.