Files
grafana/pkg/services/sqlstore/migrations
Grot (@grafanabot) 596ba76332 [v9.2.x] Alerting: Prevent uid collision in migration when db is case-insensitive (#60834)
Alerting: Prevent uid collision in migration when db is case-insensitive (#60494)

* Alerting: Prevent short uid collision in legacy migration when db is case-insensitive

Two factors come into play that cause sporadic uid conflicts during legacy alert migration:
- MySQL and MySQL-compatible backends use case-insensitive collation.
- Our short uid generator is not a uniform RNG and generates uids in such a way that generations in quick succession have a higher probability of creating similar uids.

Normally we would be guaranteed unique short uid generation, however if the source alphabet contains
duplicate characters (for example, if we use case-insensitive comparison) this guarantee is void.

Generating even ~1000 uids in quick succession is nearly guaranteed to create a case-insensitive
duplicate.

(cherry picked from commit 570b62091c)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-12-29 16:15:42 -05:00
..
2019-03-11 10:49:55 +01:00
2022-07-18 15:14:58 +02:00
2018-02-16 17:36:28 +01:00
2022-02-23 16:56:21 +01:00
2020-09-22 16:22:19 +02:00