Automatic managed-ledger offload triggers create redundant retry work Coalesce automatic…
- User
Automatic managed-ledger offload triggers create redundant retry work
Coalesce automatic offload triggers while an automatic offload is running. There must be at most one active automatic run and at most one follow-up run when additional triggers arrive. A follow-up must still process newly eligible ledgers, and explicit/manual offload futures must retain their existing behavior.
Interface
No new public interfaces are introduced.
- Assistant
I’ll trace the managed-ledger offload trigger path and its concurrency tests, then implement the smallest internal coalescing change and run the focused suite.
- Assistant
rgisn’t installed in this checkout, so I’m switching to targetedfind/grepinspection and keeping the search scoped to source files. - Assistant
The retry amplification is in
ManagedLedgerImpl: each automatic trigger that loses the shared offload mutex schedules its own retry. I’m separating fire-and-forget automatic triggers into a three-state coordinator (idle, running, running-with-one-follow-up), while leaving caller-owned futures and manual prefix offloads on their current paths. - Assistant
The coordinator now recomputes thresholds and the ledger set when its single follow-up starts, so ledgers that become eligible during the first run are included. The original retry semantics remain intact for non-sentinel futures and manual prefix requests. Compilation is still running through the module dependency graph.
- Assistant
The first Gradle invocation stalled attempting dependency resolution, so I stopped it and will rerun strictly offline. If the local cache is incomplete, I’ll report that limitation rather than fetch anything.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.