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

Improve robustness of fetches during database instability #739

Closed jbearer closed 5 days ago

jbearer commented 5 days ago

We have observed on Mainnet that when the database is having errors (such as performance issues leading to timeouts acquiring a connection), some fetches never return, because we erroneously believe an object is missing and wait for, when really it was just temporarily inaccessible and no one is fetching it.

This PR:

The guarantee that this change upholds is that every fetch will eventually resolve as long as the requested object is either fetchable or exists in the database already.

See commit messages, comments and new tests for additional details.