Distributed Lock Service  ·  View 04 of 26  ·  2 · People and journeys

Journey — Service Owner Onboards a Correctness Lock

From an incident review to a lock whose stale writer is proven to be rejected.

Editable source SVG draw.io All views
Service owner payments ledger team Goal — Stop two settlement runs from posting the same batch Trigger — An incident review found a duplicate posting Done when — Stale writer rejected in a staged pause test 1 · Question the lock 2 · Declare the class 3 · Fence the store ◆ moment of truth 4 · Prove the failure ◆ moment of truth 5 · Go live 6 · Operate What they do Checks for a CAS first Opens a LockClass PR Adds token column Guards the UPDATE Runs pause test Enables in prod Watches contention Touchpoint Decision guide Class schema lint Reference fence Fault-injection kit Argo CD sync Namespace dashboard How it feels Confident Unsure Blocked Where it hurts No one asked if needed Legacy store has no CAS Pauses are hard to stage Cost only seen monthly What the platform gives Contention ratio up front TTL cost printed in PR Time-boxed advisory waiver Scripted SIGSTOP holder Per-record lock alarm Journey — Service Owner Onboards a Correctness Lock v 1.0 · owner Platform Architecture · date 2026-09

The trough, and the answer to it

  • The low point is fencing the store. A legacy store with no conditional write cannot check a token, and the owner discovers this after they have already committed to using a lock.
  • The platform's answer is a time-boxed advisory waiver: the class is created, marked advisory, given a named risk owner and an expiry date, and appears on the risk register until it is fenced or the waiver is renewed on the record.

Decisions it forces

  • The first phase asks whether the store already has compare-and-set. If it does, the conditional write is the protection and the lock is often unnecessary. The cheapest lock is the one not taken.
  • The LockClass pull request prints the renewal cost of the chosen TTL. Shortening a TTL for faster failover is a cost decision and the owner sees the number before merge.
  • Go-live requires a staged pause test: the kit freezes a holder with SIGSTOP past its TTL and asserts the resource rejects its resumed write. A class cannot be marked fenced on assertion alone.

Assumptions

  • Onboarding a fenced class takes a team two to four days, most of it in the store's write path, not in the lock client.