Quick Decision Rule: When Ensuring two workers cannot concurrently overwrite a shared storage object if Worker A pauses for a 15-second GC stop-the-world while its lock TTL expires, choose Monotonically increasing fencing token issued by the lock service and validated by the storage layer on every write.
| Trigger Condition | Ensuring two workers cannot concurrently overwrite a shared storage object if Worker A pauses for a 15-second GC stop-the-world while its lock TTL expires |
|---|---|
| Recommended Choice | Monotonically increasing fencing token issued by the lock service and validated by the storage layer on every write |
| Classic Trap | A client-checked Redis TTL lock cannot prevent a paused process from waking up after lock expiry and issuing a stale write; the storage layer must reject lower tokens. |
| Verification | Audited on 2026-11-23 · Distributed Systems Core · 2026 |
30-SECOND DECISION TRAP CHECK · CONSISTENCY
A service acquires a 10s Redis distributed lock before writing to shared object storage. Occasionally Worker A freezes in a 15s GC pause, Worker B acquires the expired lock, and Worker A wakes up and overwrites Worker B’s newer file. How do you actually prevent corruption?
Client-side leases cannot stop a paused process from issuing a delayed write after expiry. Only storage-side validation of monotonically increasing fencing tokens guarantees safety.
Trap: A Redis TTL lock alone is unsafe for correctness; storage must enforce monotonic fencing tokens.