crash-safe slaves: relay_log_recovery breaks replication
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.6 |
Fix Released
|
Undecided
|
Krunal Bauskar |
Bug Description
Per
https:/
http://
I've configured our PXC cluster with:
relay_log_
master_
relay_log_recovery = 1
to increase our resiliency to a crash during replication.
Currently we have one cluster node replicating from a standalone vanilla percona db master. The cluster is read_only.
Replication works fine initially, but if I do a normal shutdown of the cluster node, I get some weird errors on startup about the log configuration, and some noise from WSREP:
<snip>
2015-09-10 16:25:41 101751 [Note] InnoDB: 128 rollback segment(s) are active.
2015-09-10 16:25:41 101751 [Note] InnoDB: Waiting for purge to start
2015-09-10 16:25:41 101751 [Note] InnoDB: Percona XtraDB (http://
2015-09-10 16:25:41 7ee225f80700 InnoDB: Loading buffer pool(s) from /u/mysql/
2015-09-10 16:25:41 101751 [Note] RSA private key file not found: /u/mysql/
2015-09-10 16:25:41 101751 [Note] RSA public key file not found: /u/mysql/
2015-09-10 16:25:41 101751 [Note] Server hostname (bind-address): '*'; port: 3330
2015-09-10 16:25:41 101751 [Note] IPv6 is available.
2015-09-10 16:25:41 101751 [Note] - '::' resolves to '::';
2015-09-10 16:25:41 101751 [Note] Server socket created on IP: '::'.
2015-09-10 16:25:41 101751 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-
2015-09-10 16:25:41 101751 [Warning] Recovery from master pos 168358716 and file binlog.000002.
2015-09-10 16:25:41 101751 [Warning] WSREP: unsupported key version: -1 (FATAL)
at galera/
2015-09-10 16:25:41 101751 [Warning] WSREP: Appending row key failed: void, 6
2015-09-10 16:25:41 101751 [ERROR] Error writing relay log configuration.
2015-09-10 16:25:41 101751 [ERROR] Error reading relay log configuration.
2015-09-10 16:25:41 101751 [ERROR] Failed to initialize the master info structure
2015-09-10 16:25:41 101751 [Note] Check error log for additional messages. You will not be able to start replication until the issue is resolved and the server restarted.
2015-09-10 16:25:41 101751 [Note] Event Scheduler: Loaded 0 events
2015-09-10 16:25:41 101751 [Note] WSREP: Initialized wsrep sidno 3
2015-09-10 16:25:41 101751 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2015-09-10 16:25:41 101751 [Note] WSREP: REPL Protocols: 7 (3, 2)
2015-09-10 16:25:41 101751 [Note] WSREP: Service thread queue flushed.
2015-09-10 16:25:41 101751 [Note] WSREP: Assign initial position for certification: 370, protocol version: 3
2015-09-10 16:25:41 101751 [Note] WSREP: Service thread queue flushed.
2015-09-10 16:25:41 101751 [Note] WSREP: Synchronized with group, ready for connections
2015-09-10 16:25:41 101751 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2015-09-10 16:25:41 101751 [Note] /u/mysql/
Version: '5.6.24-
2015-09-10 16:25:50 7ee225f80700 InnoDB: Buffer pool(s) load completed at 150910 16:25:50
and as expected the slave won't start:
MySQL [a_production]> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
But if I shut it down and set relay_log_
<snip>
2015-09-10 16:28:04 104263 [Note] InnoDB: 128 rollback segment(s) are active.
2015-09-10 16:28:04 104263 [Note] InnoDB: Waiting for purge to start
2015-09-10 16:28:04 104263 [Note] InnoDB: Percona XtraDB (http://
2015-09-10 16:28:04 7f2cb9f80700 InnoDB: Loading buffer pool(s) from /u/mysql/
2015-09-10 16:28:04 104263 [Note] RSA private key file not found: /u/mysql/
2015-09-10 16:28:04 104263 [Note] RSA public key file not found: /u/mysql/
2015-09-10 16:28:04 104263 [Note] Server hostname (bind-address): '*'; port: 3330
2015-09-10 16:28:04 104263 [Note] IPv6 is available.
2015-09-10 16:28:04 104263 [Note] - '::' resolves to '::';
2015-09-10 16:28:04 104263 [Note] Server socket created on IP: '::'.
2015-09-10 16:28:04 104263 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-
2015-09-10 16:28:04 104263 [Note] Event Scheduler: Loaded 0 events
2015-09-10 16:28:04 104263 [Note] WSREP: Initialized wsrep sidno 3
2015-09-10 16:28:04 104263 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2015-09-10 16:28:04 104263 [Note] WSREP: REPL Protocols: 7 (3, 2)
2015-09-10 16:28:04 104263 [Note] WSREP: Service thread queue flushed.
2015-09-10 16:28:04 104263 [Note] WSREP: Assign initial position for certification: 370, protocol version: 3
2015-09-10 16:28:04 104263 [Note] WSREP: Service thread queue flushed.
2015-09-10 16:28:04 104263 [Note] WSREP: Synchronized with group, ready for connections
2015-09-10 16:28:04 104263 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2015-09-10 16:28:04 104263 [Note] /u/mysql/
Version: '5.6.24-
2015-09-10 16:28:13 7f2cb9f80700 InnoDB: Buffer pool(s) load completed at 150910 16:28:13
<snip>
and I'm able to start slave just fine.
tags: | added: i62894 |
Verified with Server version: 5.6.26-74.0-56 Percona XtraDB Cluster (GPL), Release rel74.0, Revision 1, WSREP version 25.12, wsrep_25.12