Skip to content

Commit 12cad0c

Browse files
Daniele SciasciaJan Lindström
authored andcommitted
MDEV-27615 Assertion `server_id.is_undefined() == false' failed
Add test case that reproduces the issue and update wsrep-lib submodule to include the fix. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
1 parent 3d69213 commit 12cad0c

File tree

3 files changed

+100
-1
lines changed

3 files changed

+100
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
connection node_2;
2+
connection node_1;
3+
connection node_1;
4+
connection node_2;
5+
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
6+
connection node_2;
7+
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
8+
SET DEBUG_SYNC='wsrep_before_fragment_certification SIGNAL before_fragment WAIT_FOR continue';
9+
SET SESSION wsrep_trx_fragment_size=1;
10+
START TRANSACTION;
11+
INSERT INTO t1 VALUES (1);;
12+
connection node_2a;
13+
SET SESSION wsrep_sync_wait = 0;
14+
SET DEBUG_SYNC='now WAIT_FOR before_fragment';
15+
SET GLOBAL wsrep_cluster_address = '';
16+
SET DEBUG_SYNC = 'now SIGNAL continue';
17+
connection node_2;
18+
ERROR HY000: Lost connection to MySQL server during query
19+
connection node_2a;
20+
SELECT * FROM mysql.wsrep_streaming_log;
21+
node_uuid trx_id seqno flags frag
22+
SELECT * FROM t1;
23+
f1
24+
DROP TABLE t1;
25+
SET DEBUG_SYNC = 'RESET';
26+
disconnect node_2;
27+
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# MDEV-27615 - Assertion `server_id.is_undefined() == false'
3+
# failed in wsrep::transaction::certify_fragment()
4+
#
5+
6+
--source include/galera_cluster.inc
7+
--source include/have_debug_sync.inc
8+
9+
--let $node_1=node_1
10+
--let $node_2=node_2
11+
--source suite/galera/include/auto_increment_offset_save.inc
12+
13+
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
14+
15+
--connection node_2
16+
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
17+
18+
#
19+
# Set debug sync point right before the assert
20+
#
21+
SET DEBUG_SYNC='wsrep_before_fragment_certification SIGNAL before_fragment WAIT_FOR continue';
22+
23+
SET SESSION wsrep_trx_fragment_size=1;
24+
START TRANSACTION;
25+
--send INSERT INTO t1 VALUES (1);
26+
27+
28+
#
29+
# Disconnect node_2 from cluster
30+
#
31+
--connection node_2a
32+
SET SESSION wsrep_sync_wait = 0;
33+
--let $node_2_cluster_address = `SELECT @@wsrep_cluster_address`
34+
SET DEBUG_SYNC='now WAIT_FOR before_fragment';
35+
SET GLOBAL wsrep_cluster_address = '';
36+
37+
--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
38+
--source include/wait_condition.inc
39+
SET DEBUG_SYNC = 'now SIGNAL continue';
40+
41+
42+
#
43+
# Disconnect causes connection to node_2 to be closed
44+
#
45+
--connection node_2
46+
--error 2013 # CR_SERVER_LOST
47+
--reap
48+
49+
50+
#
51+
# Reconnect node 2
52+
#
53+
--connection node_2a
54+
--disable_query_log
55+
--eval SET GLOBAL wsrep_cluster_address = '$node_2_cluster_address';
56+
--enable_query_log
57+
--source include/wait_wsrep_ready.inc
58+
59+
#
60+
# Expect the transaction to be rolled back and cleanup
61+
#
62+
SELECT * FROM mysql.wsrep_streaming_log;
63+
SELECT * FROM t1;
64+
65+
DROP TABLE t1;
66+
SET DEBUG_SYNC = 'RESET';
67+
68+
--disconnect node_2
69+
--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
70+
71+
72+
--source suite/galera/include/auto_increment_offset_restore.inc

wsrep-lib

0 commit comments

Comments
 (0)