Able to query table under-going an RSU while node is desyned from Cluster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL patches by Codership |
New
|
Undecided
|
Unassigned | ||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Invalid
|
Undecided
|
Hrvoje Matijakovic |
Bug Description
As per the Percona FAQ:
http://
“Unknown error (node is online but Galera is not connected/synced with the cluster)”
1) Wsrep_OSU_
2) Node1/2/3: mysql –u root –p –e’show create table t1’
+------
| Table | Create Table |
+------
| t1 | CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hostname` varchar(64) NOT NULL,
`port` int(11) NOT NULL,
`instime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=
+------
1 row in set (0.00 sec)
3) Beginning row counts of t1 on all three nodes:
+------
| count(*) | @@hostname | now() |
+------
| 17291893 | Node1 | 2012-03-26 10:45:31 |
+------
+------
| count(*) | @@hostname | now() |
+------
| 17291893 | node2 | 2012-03-26 10:45:32 |
+------
+------
| count(*) | @@hostname | now() |
+------
| 17291893 | node3 | 2012-03-26 10:45:31 |
+------
4) Add a column to table t1 on node1:
mysql> select now();
+------
| now() |
+------
| 2012-03-26 10:46:15 |
+------
1 row in set (0.00 sec)
mysql> ALTER TABLE repl.t1 add column10 int;
Query OK, 17291893 rows affected (2 min 55.97 sec)
Records: 17291893 Duplicates: 0 Warnings: 0
mysql> select now();
+------
| now() |
+------
| 2012-03-26 10:49:11 |
+------
1 row in set (0.00 sec)
5) Login to node1 - able to select a row from the table under-going RSU (node1) - was expecting to get an "Unknown Command" message based on the FAQ linked above.
mysql> select *,now() from t1 where port=9999;
+------
| id | hostname | port | instime | now() |
+------
| 51875649 | RSU-test | 9999 | 2012-03-26 10:44:19 | 2012-03-26 10:46:57 |
+------
1 row in set (7.04 sec)
6) Log messages from all three nodes:
[root@node1]# cat node1.err
120326 10:46:15 [Note] WSREP: Node 1 (node1) desyncs itself from group
120326 10:46:15 [Note] WSREP: Shifting SYNCED -> DONOR/DESYNCED (TO: 28807712)
120326 10:46:15 [Note] WSREP: Provider paused at ea8d8c3e-
120326 10:49:11 [Note] WSREP: Provider resumed.
120326 10:49:11 [Note] WSREP: Node 1 (node1) resyncs itself to group
120326 10:49:11 [Note] WSREP: Shifting DONOR/DESYNCED -> JOINED (TO: 28807712)
120326 10:49:11 [Note] WSREP: Member 1 (node1) synced with group.
120326 10:49:11 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 28807712)
120326 10:49:11 [Note] WSREP: Synchronized with group, ready for connections
[root@node2]# cat node2.err
120326 10:46:16 [Note] WSREP: Node 1 (node1) desyncs itself from group
120326 10:49:12 [Note] WSREP: Node 1 (node1) resyncs itself to group
120326 10:49:12 [Note] WSREP: Member 1 (node1) synced with group.
[root@node3]# cat node3.err
120326 10:46:14 [Note] WSREP: Node 1 (node1) desyncs itself from group
120326 10:49:10 [Note] WSREP: Node 1 (node1) resyncs itself to group
120326 10:49:10 [Note] WSREP: Member 1 (node1) synced with group.
7) show create table t1
node1 (node that underwent RSU):
CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hostname` varchar(64) NOT NULL,
`port` int(11) NOT NULL,
`instime` datetime NOT NULL,
`column10` int(11) DEFAULT NULL, New column has been added.
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=
node2
CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hostname` varchar(64) NOT NULL,
`port` int(11) NOT NULL,
`instime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=
node3
CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hostname` varchar(64) NOT NULL,
`port` int(11) NOT NULL,
`instime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=
Thanks
Patrick
tags: | added: doc |
Changed in percona-xtradb-cluster: | |
status: | Confirmed → Triaged |
Changed in percona-xtradb-cluster: | |
milestone: | none → 5.5.31-25 |
milestone: | 5.5.31-25 → 5.5.31-24.8 |
Changed in percona-xtradb-cluster: | |
milestone: | 5.5.31-23.7.5 → none |
FAQ needs to be updated. In addition to that check we need to add: local_state' "
"show status like 'wsrep_
If this is not equal 4 ( SYNC state), then Node is not synced.