List:Replication« Previous MessageNext Message »
From:Jeremy Zawodny Date:February 22 2011 12:07am
Subject:Re: replication after network link failure
View as plain text  
http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_slave-net-timeout

On Mon, Feb 21, 2011 at 3:58 PM, Govender, Sashan <
Sashan.Govender@stripped> wrote:

> I've done some further investigation and in summary when the break in the
> link between the two networks isn't directly at one of the mysql db hosts
> then replication doesn't happen instantly after the link is restored.
>
> Case 1:
>
> mysqldb1 ------- switch ---- broken link --- router ----- switch -------
> mysqldb2.
>
> In this case when the link is restored replication isn't instantaneous and
> I need to manually intervene with a slave start;slave stop; to get data to
> replicate.
>
> Case 2:
>
> mysqldb1 --- broken link --- switch --- router ---- switch ---- mysqldb2
>
> In this case replication is instantaneous. I don't need to manually
> intervene.
>
>
> What's the recommended way to handle case 1?
>
>
>
>
> ________________________________
> From: vegivamp@stripped [mailto:vegivamp@stripped] On Behalf Of Johan De
> Meersman
> Sent: Monday, February 21, 2011 10:56 PM
> To: Govender, Sashan
> Cc: replication@stripped
> Subject: Re: replication after network link failure
>
> Very peculiar indeed. Does the master's 'show master status'output line up
> with the slave's 'show slave status' output ?
>
> On Mon, Feb 21, 2011 at 2:37 AM, Govender, Sashan <
> Sashan.Govender@stripped<mailto:Sashan.Govender@stripped>>
> wrote:
> Hi
>
> We have an issue with replication where data in the table is not replicated
> within 5 minutes after network link fails. The setup we have is a
> master/master. We have an application writing to node 1 and the data is
> replicated to node 2. Then we pull out the cable connecting the 2 nodes
> while the application is writing to the database. After a while we stick the
> cable back in and check node 2 expecting that the data is replicated there
> but it isn't. There are no errors in the log file to indicate anything
> wrong.
>
> The output from show slave status\G looks sane after plugging the cable
> back into the switch. I've pasted the output from both nodes below. There
> are no errors in the mysql log files but the data that I expect to be
> replicated after plugging the cable back into the switch is not replicated.
> Is there some config option I'm missing?
>
> mysql> show slave status\G
> *************************** 1. row ***************************
>              Slave_IO_State: Waiting for master to send event
>                 Master_Host: metropolisdb1
>                 Master_User: replicate
>                 Master_Port: 3306
>               Connect_Retry: 60
>             Master_Log_File: mysql-bin.000001
>         Read_Master_Log_Pos: 107
>              Relay_Log_File: gothamdb1-relay-bin.000002
>               Relay_Log_Pos: 253
>       Relay_Master_Log_File: mysql-bin.000001
>            Slave_IO_Running: Yes
>           Slave_SQL_Running: Yes
>             Replicate_Do_DB: test
>         Replicate_Ignore_DB:
>          Replicate_Do_Table:
>      Replicate_Ignore_Table:
>     Replicate_Wild_Do_Table:
>  Replicate_Wild_Ignore_Table:
>                  Last_Errno: 0
>                  Last_Error:
>                Skip_Counter: 0
>         Exec_Master_Log_Pos: 107
>             Relay_Log_Space: 413
>             Until_Condition: None
>              Until_Log_File:
>               Until_Log_Pos: 0
>          Master_SSL_Allowed: No
>          Master_SSL_CA_File:
>          Master_SSL_CA_Path:
>             Master_SSL_Cert:
>           Master_SSL_Cipher:
>              Master_SSL_Key:
>       Seconds_Behind_Master: 0
> Master_SSL_Verify_Server_Cert: No
>               Last_IO_Errno: 0
>               Last_IO_Error:
>              Last_SQL_Errno: 0
>              Last_SQL_Error:
>  Replicate_Ignore_Server_Ids:
>            Master_Server_Id: 2
> 1 row in set (0.00 sec)
>
>
> mysql> show slave status\G
> *************************** 1. row ***************************
>              Slave_IO_State: Waiting for master to send event
>                 Master_Host: gothamdb1
>                 Master_User: replicate
>                 Master_Port: 3306
>               Connect_Retry: 60
>             Master_Log_File: mysql-bin.000001
>         Read_Master_Log_Pos: 53875
>              Relay_Log_File: metropolisdb1-relay-bin.000002
>               Relay_Log_Pos: 54021
>       Relay_Master_Log_File: mysql-bin.000001
>            Slave_IO_Running: Yes
>           Slave_SQL_Running: Yes
>             Replicate_Do_DB: test
>         Replicate_Ignore_DB:
>          Replicate_Do_Table:
>      Replicate_Ignore_Table:
>     Replicate_Wild_Do_Table:
>  Replicate_Wild_Ignore_Table:
>                  Last_Errno: 0
>                  Last_Error:
>                Skip_Counter: 0
>         Exec_Master_Log_Pos: 53875
>             Relay_Log_Space: 54185
>             Until_Condition: None
>              Until_Log_File:
>               Until_Log_Pos: 0
>          Master_SSL_Allowed: No
>          Master_SSL_CA_File:
>          Master_SSL_CA_Path:
>             Master_SSL_Cert:
>           Master_SSL_Cipher:
>              Master_SSL_Key:
>       Seconds_Behind_Master: 0
> Master_SSL_Verify_Server_Cert: No
>               Last_IO_Errno: 0
>               Last_IO_Error:
>              Last_SQL_Errno: 0
>              Last_SQL_Error:
>  Replicate_Ignore_Server_Ids:
>            Master_Server_Id: 1
> 1 row in set (0.00 sec)
>
> Regards,
>
> Sashan
> --
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:
> http://lists.mysql.com/replication?unsub=1
>
>
>
>
> --
> Bier met grenadyn
> Is als mosterd by den wyn
> Sy die't drinkt, is eene kwezel
> Hy die't drinkt, is ras een ezel
>

Thread
replication after network link failureSashan Govender21 Feb
  • Re: replication after network link failureJohan De Meersman21 Feb
    • RE: replication after network link failureSashan Govender22 Feb
      • Re: replication after network link failureJeremy Zawodny22 Feb
        • RE: replication after network link failureSashan Govender22 Feb