mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
walproposer: move CHECK_FOR_INTERRUPTS to after waiting.
We should check it always after a sleep even before starting streaming.
This commit is contained in:
@@ -286,7 +286,6 @@ WalProposerPoll(WalProposer *wp)
|
||||
void
|
||||
WalProposerStart(WalProposer *wp)
|
||||
{
|
||||
|
||||
/* Initiate connections to all safekeeper nodes */
|
||||
for (int i = 0; i < wp->n_safekeepers; i++)
|
||||
{
|
||||
|
||||
@@ -1270,13 +1270,8 @@ WalSndLoop(WalProposer *wp)
|
||||
{
|
||||
XLogRecPtr flushPtr;
|
||||
|
||||
/* Clear any already-pending wakeups */
|
||||
ResetLatch(MyLatch);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
|
||||
XLogBroadcastWalProposer(wp);
|
||||
WalProposerPoll(wp);
|
||||
}
|
||||
@@ -1807,6 +1802,8 @@ walprop_pg_wait_event_set(WalProposer *wp, long timeout, Safekeeper **sk, uint32
|
||||
late_cv_trigger = ConditionVariableCancelSleep();
|
||||
#endif
|
||||
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
|
||||
/*
|
||||
* Process config if requested. This restarts walproposer if safekeepers
|
||||
* list changed. Don't do that for sync-safekeepers because quite probably
|
||||
|
||||
Reference in New Issue
Block a user