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

Aberta
#825 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

@burgulvedant já está trabalhando nisso.

Desde 31/10/2026.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
go

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Go
Estrelas
247
Forks
16
Merge médio
2d 1h
PRs com merge (30d)
125

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de uber/submitqueue

Todas as issues de uber/submitqueue

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.