PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
23.48k stars 1.03k forks source link

fix: schema cache retrying without backoff #3654

Closed steve-chavez closed 4 months ago

steve-chavez commented 4 months ago

Fixes https://github.com/PostgREST/postgrest/issues/3523, https://github.com/PostgREST/postgrest/issues/2818.

Now if there's a failure when obtaining the pg version OR schema cache, we do the same retrying process. This way we don't add two retries.

Refactors and renames the "connectionWorker" to "schemaCacheLoader". This makes more sense since what we really want is the schema cache, the version is the pre-requisite for ensuring our schema cache queries work.

Additionally, we no longer log Attempting to connect to the database... at startup unnecessarily. This is only logged whenever there's a retry attempt.

steve-chavez commented 4 months ago

Some failures on master CI.. that's strange: