Orchestration execution goes into infinite loop when decisions.Count == 0
- Vorherrschende Sprache
- C#
- Sterne
- 1.7k
- Forks
- 335
- Ø Merge
- 2 T. 23 Std.
- Gemergte PRs (30 T.)
- 6
Beschreibung
(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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne in TaskOrchestrationDispatcher::OnProcessWorkItemAsync auf dem vnext-Branch und verfolge den Pfad, auf dem der Laufzeitstatus noch verarbeitet wird, während decisions.Count == 0 ist. Reproduziere den im Issue beschriebenen ContinueAsNew-Race oder untersuche ihn, und ermittle anschließend, wie completion gesetzt werden sollte, damit spätere Ereignisse nicht verloren gehen. Das Issue nennt keinen Test und liefert keine endgültige Entscheidung zum Terminalstatus.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- backend, distributed-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100