1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00
unleash.unleash/src/test
Ivar Conradi Østhus f0895cf653
fix: prevent deadlock for batchinserting usage metrics (#1100)
* fix: prevent deadlock for batchinserting usage metrics

In client metrics v2 we utilize postgres to count the usage
across a few dimentions (featureName, app_name, environment).

It turns out that if the UPDATE values are not executed in a predictable
order we can end up in a deadlock scenario with postgresql.

In this fix we thus sort the metrics on the feature_name, app_name and
envrionment, to make sure they always are executed in a predictabel
order, and thus avoiding independent inserts colliding in to a deadlock
waiting for eachother.

* fix: tests cannot assume order
2021-11-11 16:05:29 +01:00
..
config fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
e2e fix: prevent deadlock for batchinserting usage metrics (#1100) 2021-11-11 16:05:29 +01:00
examples feat: rename :global: env to "default" (#947) 2021-09-24 13:55:00 +02:00
fixtures feat: Disable password based login (#1046) 2021-10-29 10:25:42 +02:00