Files
oak-gpui/crates/collab/src
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-08-01 15:43:29 -04:00
2024-09-06 11:58:39 +02:00
2024-10-09 14:22:32 -04:00
2024-05-03 12:50:42 -07:00