Transactional enqueue: killing the dual-write bug
· One min read
You write an order row, then enqueue its fulfillment job. What happens if the process dies between the two? Or the transaction rolls back after the job was queued? You get a job referencing data that doesn't exist — the dual-write bug.