Azure / Azure/durabletask

Orchestration execution goes into infinite loop when decisions.Count == 0

Aperta
#77 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
1.7k
Fork
335
Merge medio
2g 23h
PR unite (30g)
6

Descrizione

(on vnext branch)

For whatever reason, in TaskOrchestrationDispatcher::OnProcessWorkItemAsync, if the runtime state indicates that it's still processing, but executes no events (aka, decisions.Count == 0), the orchestration never completes (successfully or not). Any new events that come in for that orchestration instance will get lost and never executed as isCompleted is never set to true.

Summary of what may have caused this:
- We have a long-running orchestration that does ContinueAsNew after a single event is processed
- An event was being processed by the orchestration, and a new event may have come in just as the orchestration was executing ContinueAsNew command
- Logging indicates that we did receive the ContinueAsNew with the new state being passed, however the orchestration execution did not complete and clear the runtime state.

To prevent this issue going forward, if decisions.Count == 0, a completed state needs to be determined, whether it's terminal or not is up to the team implementing.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia in TaskOrchestrationDispatcher::OnProcessWorkItemAsync sul branch vnext e traccia il percorso in cui lo stato di runtime è ancora in elaborazione mentre decisions.Count == 0. Riproduci o esamina la race di ContinueAsNew descritta nell'issue, quindi determina come dovrebbe essere impostato completion affinché gli eventi successivi non vadano persi. L'issue non indica alcun test né fornisce una decisione definitiva sullo stato terminale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
backend, distributed-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.