perf(cache): parallelize tiered heal reads from the source tier#388
Open
worstell wants to merge 1 commit into
Open
perf(cache): parallelize tiered heal reads from the source tier#388worstell wants to merge 1 commit into
worstell wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd75fd5888
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The tier-0 heal previously pulled the whole object from the source tier as a single stream, so only an S3 source (which fans out internally) saturated the link. The heal now drives client.ParallelGetReader itself, pinned to the healed revision via If-Match, giving any Range-capable source tier parallel throughput and degrading to a single stream for sources without Range/ETag support. Heal chunks stay below the S3 tier's internal large-range fan-out threshold so requests are never amplified twice.
worstell
force-pushed
the
worstell/tiered-parallel-heal
branch
from
July 20, 2026 20:50
cd75fd5 to
d1381a2
Compare
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.
The tier-0 heal (
backfillTier0FromSource) pulled the whole object from the source tier as a single stream, so parallel throughput depended on the source: S3 fans out internally, but any other tier (e.g. a future remote HTTP tier) would be limited to one connection.The heal now uses
client.ParallelGetReaderagainst the source tier directly, with every request pinned to the healed revision via If-Match so a concurrent rewrite fails the heal instead of splicing revisions. Discovery degrades to a single stream when the source lacks Range or ETag support, so non-range-capable sources behave as before.Heal chunks are sized at
minRangePartSize(4 MiB), below the S3 tier's internal large-range fan-out threshold, so each chunk maps to exactly one upstream request and fan-out is never applied twice.Follow-ups (separate PRs): generalize the S3 byte-window adapter over any
Cache, and apply the large-range fan-out policy on theRemote/Tieredranged-read path.