MySQL Clusterのレプリケーションを設定したところ、こんなエラー。
正解:
1)SQLNodeの再起動時
2)SQLNode稼働中に全てのDataNodeが停止した場合
上記ケースにて、当該SQLNodeのバイナリログにLOST_EVENTSが出力される。
SQLNode停止から再起動までの間に発生した他のSQLNodeからの更新を、再起動したSQLNodeのバイナリログファイルに反映でき ないことによる不整合の発生を回避することを目的として。
「データが同じならば、とりあえずSET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;で進めてしまう」が対処方法。
[(none)]> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 172.20.100.22
Master_User: rep
Master_Port: 3307
Connect_Retry: 60
Master_Log_File: h2-2.000005
Read_Master_Log_Pos: 106
Relay_Log_File: h1-relay-bin.000003
Relay_Log_Pos: 246
Relay_Master_Log_File: h2-2.000002
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1590
Last_Error: The incident LOST_EVENTS occured on the master. Message: mysqld startup
Skip_Counter: 0
Exec_Master_Log_Pos: 106
Relay_Log_Space: 1988
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: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1590
Last_SQL_Error: The incident LOST_EVENTS occured on the master. Message: mysqld startup
1 row in set (0.00 sec)