Anti-double-lock partial-unique index for RCE lock records (doc 08 §7.3)

FeatureInitializerService
Shipped
June 28, 2026 at 3:40 PM UTC
Author
Kamo
Commit
c2a1647

SchemaCleanupRunner adds **************** — a partial UNIQUE index on mlos_lock_record (organization_id, loan_scenario_id) WHERE status IN **************** At most one live rate lock per loan scenario: the deterministic DB backstop to MLOSCapitalMarketsService's app-level anti-double-lock guard, closing the concurrent-commit TOCTOU race (a duplicate live lock is silent compliance corruption — the lock ledger has no supersedes_id). Idempotent (IF NOT EXISTS); already applied to prod CRDB.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing