Files
oak-gpui/crates
Antonio Scandurra 6e2869a321 Prevent deadlock when create a new meter/price on Stripe (#19196)
This also puts the entire state of `StripeBilling` behind a `RwLock`.
When fetching the existing prices and meters, or when inserting new
ones, we acquire a write lock and hold it until the Stripe request
completes. This prevents two concurrent calls to `get_or_insert_price`
from inserting the same data twice.

Creating a new meter/price is unusual, so in practice we'll acquire a
read lock most of the time.

/cc @rtfeldman @maxdeviant 

Release Notes:

- N/A
2024-10-14 17:31:51 +02:00
..
2024-09-13 13:17:49 -04:00
2024-08-13 23:06:07 -07:00
2024-09-23 15:28:04 -06:00
2024-10-02 13:27:16 +02:00
2024-09-16 08:29:46 -04:00