Repository navigation
registry/storage: skip duplicate checkpoints after a successful Close - #5071
Merged
milosgajdos merged 1 commit intoNov 11, 2026
Merged
Conversation
Member
|
@perfloop-agent squash your commits |
milosgajdos
approved these changes
Nov 11, 2026
A resumed PATCH closes its writer while constructing the continuation response and again during deferred cleanup. Once both the checkpoint and the driver close have succeeded, later closes need not serialize and store the same digest again. Keep calling the driver to preserve its close result and cleanup behavior. Failed closes remain retryable, and resumed uploads get a fresh writer. Bypass checkpoint tracking when digest resumption is disabled. Signed-off-by: Perfloop Agent <[email protected]> Signed-off-by: Tomás Senart <[email protected]>
perfloop-agent
force-pushed
the
perfloop-pr-open-wajdw4m375
branch
from
November 11, 2026 14:15
1e085e3 to
6af19ae
Compare
milosgajdos
approved these changes
Nov 11, 2026
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.
Closing the same uncommitted upload writer again no longer rewrites its digest checkpoint. Resumed PATCH requests close the writer while constructing the continuation response, then close it again during deferred cleanup.
Track a successful close on the writer and skip subsequent checkpoint serialization and storage. Only checkpointing is skipped: the driver's
Closeis still called on that path. A failed Close is not marked complete by this guard; subsequent Close calls still attempt checkpointing and delegate to the driver, preserving existing driver errors.Resumeconstructs a fresh writer. Cancelled and committed handling is unchanged. Disabled digest resumption bypasses the new tracking.The checked-in benchmark measures PATCH handling with a three-byte chunk, not a complete layer upload. These local results do not establish production or whole-image push savings.
The native
BenchmarkBlobUploadPatchinregistry/handlers/blobupload_test.gouses a three-byte chunk. Reproduction:go test -run='^$' -bench='^BenchmarkBlobUploadPatch$' -benchtime=50x -benchmem ./registry/handlers.Focused Go tests passed for checkpoint retries, disabled digests, close/resume/commit, cancellation and the filesystem/in-memory HTTP blob lifecycle, including the
noresumabledigestbuild. Scoped lint and commit validation passed.AI-assisted change.
Case and evidence
Made by Perfloop. Human sponsor: Tomás Senart. To ask for a change, comment or review in plain words. How Perfloop handles pull requests.