Skip to content

Commit 78f231c

Browse files
mkleczeksteve-chavez
authored andcommitted
refactor: failure in schema cache load should not set listener delay
Listener has its own backoff logic independent of schema cache loading. It also uses listener delay value to identify its retries and to trigger schema cache reloads upon failures. If schema cache reloading sets listener delay it might lead to some unexpected reloading loops. That's especially important in set ups where listener connection points to master and the pool to replica(s).
1 parent 5992430 commit 78f231c

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/PostgREST/AppState.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ retryingSchemaCacheLoad appState@AppState{stateObserver=observer, stateMainThrea
364364
when (rsIterNumber > 0) $ do
365365
let delay = fromMaybe 0 rsPreviousDelay `div` oneSecondInUs
366366
observer $ ConnectionRetryObs delay
367-
putNextListenerDelay appState delay
368367

369368
flushPool appState
370369

0 commit comments

Comments
 (0)