KamoCRM

Fail the run when a required UNIQUE index cannot be created

FixInitializerService
Shipped
6 ஆகஸ்ட், 2026 அன்று 11:58 AM UTC
Author
Kamo
Commit
a1714a1

ensure() caught Exception and logged, so a failed CREATE UNIQUE INDEX reported success and the service booted with no uniqueness guarantee at all — the one outcome the runner exists to prevent. Without the version index two concurrent publishes mint the same version number and the assignments pinned to it become ambiguous; without the attestation index one assignment can carry two attestations, since the WORM guard blocks UPDATE and not a duplicate INSERT. Split into ensureRequired, which rethrows after logging, and ensureBestEffort for the two lookup indexes, where a miss makes the badge query and the reminder sweep scan — slow, not wrong, and not worth stopping a deploy for. The javadoc now states which are fatal and why.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing