Skip to content

Detach a coalesced manifest fetch only when a detach slot is free - #798

Open
simonchrz wants to merge 1 commit into
git-pkgs:mainfrom
simonchrz:fix/manifest-detach-slot
Open

simonchrz wants to merge 1 commit into
git-pkgs:mainfrom
simonchrz:fix/manifest-detach-slot

Conversation

@simonchrz

Copy link
Copy Markdown
Contributor

Fixes #762.

coalescedManifest always ran the shared fetch on a context detached from its first caller, so GETs for uncached tags that the client drops right away each kept a goroutine and up to three upstream requests running. It now takes one of the maxDetachedMetadataFetches slots first, as coalesceMetadata does, and otherwise ends with its caller. proxy mirror cancellation stops these fetches once the slots are used up. Waiters still leave when their own context ends.

coalescedManifest always ran the shared fetch on a context detached from
its first caller. It now takes one of the maxDetachedMetadataFetches
slots first, as coalesceMetadata does, and otherwise ends with that
caller, so clients that request uncached manifests and hang up can't
leave any number of upstream fetches running.
@simonchrz simonchrz added the bug Something isn't working label Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b0906b77-1f37-4839-8c11-6f5ad812d7d8
Commits

Reviewing files that changed from the base of the PR and between 784ba61 and 57c8809.

Files selected for processing: 2

  • internal/handler/container_manifest_detach_test.go
  • internal/handler/container_manifest_fetch.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCI: coalesced manifest fetches detach without a detach slot

1 participant