mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
## What changed? Add a lock in DLQWriter that will serialize writes to a queue. ## Why? DLQ uses CAS operations in persistence layer. All shards can write tasks to DLQ if multiple tasks start failing with terminal errors. This can cause a large number of writes to fail because of CAS error. We can prevent this by serializing writes to the queue. CAS errors are still possible since multiple history hosts can write to the same queue. But less operations will fail with this change. ## How did you test it? - [x] built - [x] run locally and tested manually in a test cluster - [x] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s)