Skip to content

Commit 5839873

Browse files
committed
BUG#29899128: GR_CONSISTENT_READS_LOWER_VERSION FAILS SPORADICALLY
The test validates the behavior of Group Replication consistency guarantees when the group contains members of lower versions that do not know the consistency guarantees. The lower version members are being emulated by the use of group_replication_force_lower_version_on_group_replication_consistency debug flag. The debug flag was being unset too soon, that is, before the remote member handled the transaction with consistency guarantee, which was causing the test to fail with unexpected behaviour. Fixed by adding a synchronization point that ensures that all transactions with consistency guarantees are handled before the debug flag is unset. ReviewBoard: 22411
1 parent be37551 commit 5839873

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

mysql-test/suite/group_replication/r/gr_consistent_reads_lower_version.result

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ ERROR 40000: Plugin instructed the server to rollback the current transaction.
3333
SET @@SESSION.group_replication_consistency= 'BEFORE_AND_AFTER';
3434
INSERT INTO t1 VALUES (3);
3535
ERROR 40000: Plugin instructed the server to rollback the current transaction.
36-
SET @@SESSION.group_replication_consistency= DEFAULT;
37-
[connection server1]
38-
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
39-
[connection server2]
40-
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
4136

4237
############################################################
4338
# 06. Validate data.
39+
SET @@SESSION.group_replication_consistency= DEFAULT;
40+
INSERT INTO t1 VALUES (0);
4441
include/rpl_sync.inc
4542
[connection server1]
4643
include/assert.inc ['1 exists in table t1']
@@ -55,4 +52,7 @@ include/assert.inc ['3 does not exist in table t1']
5552
# 07. Clean up.
5653
[connection server1]
5754
DROP TABLE t1;
55+
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
56+
[connection server2]
57+
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
5858
include/group_replication_end.inc

mysql-test/suite/group_replication/t/gr_consistent_reads_lower_version.test

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,15 @@ SET @@SESSION.group_replication_consistency= 'BEFORE_AND_AFTER';
6161
--error ER_TRANSACTION_ROLLBACK_DURING_COMMIT
6262
INSERT INTO t1 VALUES (3);
6363

64-
SET @@SESSION.group_replication_consistency= DEFAULT;
65-
66-
--let $rpl_connection_name= server1
67-
--source include/rpl_connection.inc
68-
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
69-
70-
--let $rpl_connection_name= server2
71-
--source include/rpl_connection.inc
72-
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
73-
7464

7565
--echo
7666
--echo ############################################################
7767
--echo # 06. Validate data.
68+
# Wait until server1 applier handles all transactions.
69+
SET @@SESSION.group_replication_consistency= DEFAULT;
70+
INSERT INTO t1 VALUES (0);
7871
--source include/rpl_sync.inc
72+
7973
--let $rpl_connection_name= server1
8074
--source include/rpl_connection.inc
8175

@@ -113,5 +107,10 @@ SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replicati
113107
--let $rpl_connection_name= server1
114108
--source include/rpl_connection.inc
115109
DROP TABLE t1;
110+
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
111+
112+
--let $rpl_connection_name= server2
113+
--source include/rpl_connection.inc
114+
SET @@GLOBAL.DEBUG= '-d,group_replication_force_lower_version_on_group_replication_consistency';
116115

117116
--source include/group_replication_end.inc

0 commit comments

Comments
 (0)