You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
keyset-provision: the label check reads the tenant's keys under the tenant lock without an index on (tenant, label, active) #598
keyset-provision (since v5.95.0) refuses a set without replace_label while an active key of the tenant already carries one of its labels. The check runs under the tenant lock and reads the tenant's keys; there is no index on (tenant, label, active).
Measured on the PR (#595) with 20 000 keys in the tenant: 2.7 to 3.9 ms for a set of 64 labels, 19 to 24 ms for the whole set. The cost grows with the keys of the tenant and is paid while the tenant lock is held.
Not measured: several hundred thousand keys per tenant. This issue is to measure there and, if the check dominates the held lock, add a partial index in a migration of its own (the next free migration is 199).
Related limit, by design for now: the one-active-key-per-label rule holds for keyset-provision only; api-key-create and a reactivation through api-key-update do not check labels (documented in docs/api.md).
Activity