[pgpool-hackers: 1179] Fw: [pgpool-committers: 2844] pgpool: Watchdog node goes into the WD_WAITING_FOR_QUORUM state wheneve

Yugo Nagata nagata at sraoss.co.jp
Fri Dec 4 11:40:01 JST 2015


Usama,

I havn't test this specification yet, but I dought this affects interlocking.
Certainly VIP conflicts is avoided, but, because there can be two coordinators,
is it possible that there are also two lock-holders? If so, the failover command
will be executed twice on the same backend node.

Am I missing something? 

And, could you explain what is different between coordinator and escalated node
in your code.

Begin forwarded message:

Date: Thu, 03 Dec 2015 15:14:29 +0000
From: Muhammad Usama <m.usama at gmail.com>
To: pgpool-committers at pgpool.net
Subject: [pgpool-committers: 2844] pgpool: Watchdog node goes into the WD_WAITING_FOR_QUORUM state wheneve


Watchdog node goes into the WD_WAITING_FOR_QUORUM state whenever the quorum is
not present or lost. Although it is a good guard against the split-brain syndrome,
but there is a problem with this technique. pgpool-II commands which require
a cluster wide synchronization like interlocking commands start getting failed
when the node is in waiting for quorum, as these commands requires a central
coordinator node for processing

The fix for this is to remove the WD_WAITING_FOR_QUORUM state and make sure that
the cluster always elects the master node even when the quorum is not present.
But the trick is not to execute the escalation commands on master node when the
quorum is missing and waits until the quorum is complete. This new design
ensures that even when because of network partitioning or some other issue the
cluster gets multiple master nodes (split-brain syndrome) the VIP conflict will
still not happen and that multiple master node would be harmless.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=6238ba9d2aaa82db415b11aca90d54981a854e09

Modified Files
--------------
src/include/watchdog/watchdog.h |    1 -
src/watchdog/watchdog.c         |  455 +++++++++++++++++++++++++--------------
src/watchdog/wd_escalation.c    |    2 +-
src/watchdog/wd_heartbeat.c     |    6 +-
src/watchdog/wd_lifecheck.c     |    2 +-
5 files changed, 304 insertions(+), 162 deletions(-)

_______________________________________________
pgpool-committers mailing list
pgpool-committers at pgpool.net
http://www.pgpool.net/mailman/listinfo/pgpool-committers


-- 
Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-hackers mailing list