Cancel misses a batch mid-promotion, letting a cancelled request reach speculation

Offen
#825 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@burgulvedant arbeitet bereits daran.

Seit 31.10.2026.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
go

Rechercherichtung

Start by tracing dependency analysis around claimRequestsForBatch and the creating-to-created transition, then follow cancellation through markCancelling, findBatches, and cancelRequest. Check how speculation admits created batches and review the constraints from #817. Done means a cancelled request cannot reach speculation while created batches remain dependency-eligible; run the relevant tests for these transitions.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Problem

A request cancelled in the window between dependency analysis claiming it (validated → batched) and promoting its batch out of creating reaches speculation anyway. The result is a live batch carrying a request the user cancelled; it will build, and it can merge.

Interleaving

dependency analysis:  request validated → batched     (claimRequestsForBatch)
cancel:               request batched → cancelling    (markCancelling)
cancel:               findBatches sees only a creating batch — not cancellable
cancel:               request cancelling → cancelled  (no applicable batch → cancelRequest)
dependency analysis:  batch creating → created        (batch-only compare-and-swap)
dependency analysis:  publish to speculate

Why the existing guards miss it

  • The halted-request check in dependency analysis runs before the claim.
  • The claim's re-read and version check reject a cancel that lands before or during the claim, but this window opens after the claim succeeds.
  • creating is not cancellable, so cancel's batch loop matches nothing and falls through to cancelRequest.
  • Neither speculate's admission of created batches nor conclude checks for halted requests.

Found in review of #590. As of 6c050082 the code paths above are unchanged.

Constraint

From #817: a batch abandoned in creating must stay unreachable, and created must remain dependency-eligible.

Vorherrschende Sprache
Go
Sterne
247
Forks
16
Ø Merge
2 T. 1 Std.
Gemergte PRs (30 T.)
125

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus uber/submitqueue

Alle Issues in uber/submitqueue

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.