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
Postgres goes out of its way to support both concurrent readers and writers, but we are not taking advantage of this because UpdateAvailabilityData::{insert_leaf, insert_block} take &mut self, which means they require mutable access to the data source and cannot be called concurrently with each other or any immutable queries.
We can likely get better parallelism for request handlers if we allow the insert functions to take &self, so they can run concurrently with immutable queries. For data sources that don't support this kind of concurrency, like the file system, we can just use an RwLock internally.
The text was updated successfully, but these errors were encountered:
Postgres goes out of its way to support both concurrent readers and writers, but we are not taking advantage of this because
UpdateAvailabilityData::{insert_leaf, insert_block}
take&mut
self, which means they require mutable access to the data source and cannot be called concurrently with each other or any immutable queries.We can likely get better parallelism for request handlers if we allow the insert functions to take
&self
, so they can run concurrently with immutable queries. For data sources that don't support this kind of concurrency, like the file system, we can just use anRwLock
internally.The text was updated successfully, but these errors were encountered: