chusiang / mysql-master-master

Automatically exported from code.google.com/p/mysql-master-master
GNU General Public License v2.0
1 stars 1 forks source link

my own 'ignore master replication fail' #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

This is my own micro patch to ignore replication fail on active master.
use it if you like.

THANX!

--- daemonpatch.pm      2009-01-24 14:51:43.000000000 +0100
+++ daemon.pm   2009-01-23 18:19:44.000000000 +0100
@@ -237,6 +237,10 @@

         # ONLINE -> REPLICATION_FAIL
         if ($host->{state} eq 'ONLINE' && $peer->{state} eq 'ONLINE' && $host_checks->{ping} && 
$host_checks->{mysql} && !$host_checks->{rep_threads}) {
+            if ( $host_name eq GetActiveMaster() ) {
+                LogWarn("$host_name Replication Fail. Ignored in Active Master 
Host");
+                next;
+            }
             LogTrap("Daemon: State change($host_name): ONLINE -> REPLICATION_FAIL");

             # Server is offline and has no roles

Original issue reported on code.google.com by ufa...@gmail.com on 24 Jan 2009 at 1:56

GoogleCodeExporter commented 9 years ago

Original comment by ryan.a.l...@gmail.com on 29 May 2009 at 8:07