KamoCRM

The boot-time rights sync inserts a role's missing rights in ONE statement

FixSecurityService
Shipped
October 14, 2026 at 1:38 AM UTC
Author
Kamo
Commit
e034d91

b8014ab3's deploy never became ready. The 31 Show Tour rights made the row-at-a-time insert loop 31 YugabyteDB round trips per role — ~3.5 s a role, ~490 s across 140 roles — inside one transaction, longer than the startup probe's 390 s. The probe killed the pod, the transaction rolled back, and every restart began again from nothing. The old pods kept serving; the rollout was stuck. syncOrgRoleRights and syncSecurityModelRoleRights now send each role's (and each default role's) missing rights as one multi-row INSERT ... ON CONFLICT DO NOTHING, same rows and settings as before, so a boot costs a statement per role however many rights a release adds. RoleRightsSyncBatchInsertTest pins it. Completes b8014ab3.

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