---
title: "Comment by QRiQRa Team on \"I Kill My Workers on Purpose\" | Hashnode"
description: "The point that a row lock and a revision number catch different failures is easy to miss. Simultaneous writers need the lock; a decision from a screen that went"
url: "https://hashnode.com/posts/crash-safe-workflow-engine-postgres/6afcf385577ca6d1f890dc51/comment/6afd2b5f54af9423416415b8"
---

[Discussion](https://hashnode.com/posts/crash-safe-workflow-engine-postgres/6afcf385577ca6d1f890dc51)

Comment [I Kill My Workers on Purpose](https://hashnode.com/posts/crash-safe-workflow-engine-postgres/6afcf385577ca6d1f890dc51)

[QRiQRa Team](https://hashnode.com/@qriqra)

[14h ago](https://hashnode.com/posts/crash-safe-workflow-engine-postgres/6afcf385577ca6d1f890dc51/comment/6afd2b5f54af9423416415b8)

The point that a row lock and a revision number catch different failures is easy to miss. Simultaneous writers need the lock; a decision from a screen that went stale needs the revision. Treating them as one check would leave one of those gaps open. The fencing token from the claim number, with no extra column, is a clean way to drop a late result. And the backoff on expired leases is worth keeping: an overdue worker may only be slow, and an immediate retry of a job that crashed a worker can take the next one down with it. The honest limit at the end also belongs in the same picture: the database can be exactly once, while a call to another system may still run more than once if the worker disappears after the call and before the record.
