Richard Yen dba at richyen.com
Tue Feb 2 12:50:20 PST 2010
On Jan 29, 2010, at 4:30 PM, Richard Yen wrote:
> The question I have is--shouldn't the ev_origin for FAILOVER_SET be
> the nodeID of the backup node?  Seems like it wouldn't make sense that
> a failed node would create an event; the system should state that the
> backup node is the one creating the event, right?  I suppose this
> would be the remedy for the problem.

For the moment, I have decided to not try altering the Slony-I source  
code to set ev_origin to the backup node when doing a FAILOVER SET,  
especially since I haven't gotten confirmation that this would be the  
correct change to get failover working with a drop node.

Instead, I have opted to add a SYNC and WAIT FOR EVENT after the  
FAILOVER command, and have made the following patch in slony_fail.sh  
of the slony-ctl scripts:

> Modified: slony-ctl/tools/slony_fail.sh
> ===================================================================
> --- slony-ctl/tools/slony_fail.sh	2010-02-02 01:44:56 UTC (rev 824)
> +++ slony-ctl/tools/slony_fail.sh	2010-02-02 20:37:05 UTC (rev 825)
>     #--
>     INCLUDE <${SLON_ETC}/$INSTANCE.preamble>
>
> +    sync ( ID = $SLAVENODE );
> +    wait for event ( ORIGIN = all, CONFIRMED = all, WAIT ON =  
> $SLAVENODE );
> +
>     try{
>         echo 'Drop node $MASTERNODE :';
>         drop node ( ID = $MASTERNODE, EVENT NODE = $SLAVENODE );

We need an extra sync event because by the time the FAIL OVER finishes  
and generates a SYNC event, the WAIT FOR EVENT can't process it  
because the SYNC has already been propagated.  This is to replace the  
"sleep()" suggestion I had made in an earlier email.

Stéphane, can you also commit these changes to the slony1-ctl project?

Thanks!
--Richard


More information about the Slony1-general mailing list