Fix for [pgpool-general: 7896] Possible race condition..
authorMuhammad Usama <m.usama@gmail.com>
Wed, 27 Apr 2022 10:30:58 +0000 (15:30 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Sun, 1 May 2022 21:59:18 +0000 (02:59 +0500)
commitde22d5338141fe1199ca77f533a5b7ae1e1fcb25
tree8295e177785d7f5d908950fcd4c20f54a75ede04
parent0437a6edd81ac842fd8d7fb3c6433b0275d8e4aa
Fix for [pgpool-general: 7896] Possible race condition..

Watchdog does not allow the remote nodes reported lost by life-check to rejoin
the cluster until the life-check process confirms the existence of life in the
previously lost nodes. This is good enough except for the case when the
(lost by life-check) node tries to rejoin the cluster after it was restarted
(Pgpool-II service restarted).
What happens is the cluster keeps rejecting the restarted node because
the cluster's life-check doesn't agree while the restarted node's life-check
waits to be added to cluster before it can start sending the heart-beats.

The fix is to allow the previously lost remote node become the part of the
cluster after restart, no matter the lost-reason.

Issue report:
https://www.pgpool.net/pipermail/pgpool-general/2021-November/007954.html
src/watchdog/watchdog.c