EspressoSystems / hotshot-query-service

Generic query service for HotShot applications
https://espressosystems.github.io/hotshot-query-service/
GNU General Public License v3.0
5 stars 1 forks source link

Use a connection pool #567

Open jbearer opened 6 months ago

jbearer commented 6 months ago

We should have a pool of connections which we use for queries, which will open up more concurrency. We should also have a single, separate connection used for updates (SqlStorage::transaction should use this connection). Since queries will no longer use the same connection as updates, there is no longer a risk of concurrent queries seeing a partially updated state. Thus, this is a step towards #400 .

Sqlx has connection pooling built in, so it may be best to wait and do this after #271