Invariants for a Work Queue
A queue operation should preserve counts, ordering, and which identities can still be processed even when a worker reports failure.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a failure after removal
Removing a job for work and immediately forgetting it loses retry information if processing fails. A pending and active state can preserve its identity until outcome is known. See work records.
Keep different states visible
A test can check pending counts before acquisition, active work during execution, and completion or retry afterward. A transition table can state which operations are legal in each state.[1]