Skip to content

Commit bc4ddeb

Browse files
WL#9852: XCom transport abstraction
XCom is a communication framework with a PAXOS implementation that supports MySQL Group Replication. It can be conceptually divided into two sections: The PAXOS algorithm and a Communication infrastructure. Although keeping the Communication infrastructure under our control had given us an important advantage in terms of performance and fine tuning, it doubles our work in areas where the server is already mature (Secure Communications, Fragmentation). We reused existing Server facilities in order to establish connections among GCS group members. That allowed us to create authenticated and secure connections with MySQL protocol. RB: 25153
1 parent 9ce4d45 commit bc4ddeb

File tree

517 files changed

+13661
-3303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

517 files changed

+13661
-3303
lines changed

include/my_command.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ enum enum_server_command {
9393
COM_BINLOG_DUMP_GTID,
9494
COM_RESET_CONNECTION, /**< See @ref page_protocol_com_reset_connection */
9595
COM_CLONE,
96+
COM_SUBSCRIBE_GROUP_REPLICATION_STREAM,
9697
/* don't forget to update const char *command_name[] in sql_parse.cc */
9798

9899
/* Must be last */

include/mysql.h.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
COM_BINLOG_DUMP_GTID,
8787
COM_RESET_CONNECTION,
8888
COM_CLONE,
89+
COM_SUBSCRIBE_GROUP_REPLICATION_STREAM,
8990
COM_END
9091
};
9192
#include "my_compress.h"

include/mysql/plugin_audit.h.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
COM_BINLOG_DUMP_GTID,
172172
COM_RESET_CONNECTION,
173173
COM_CLONE,
174+
COM_SUBSCRIBE_GROUP_REPLICATION_STREAM,
174175
COM_END
175176
};
176177
#include "my_sqlcommand.h"

include/mysql/plugin_group_replication.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ struct GROUP_REPLICATION_GROUP_MEMBERS_CALLBACKS {
8383
size_t length);
8484
void (*set_member_version)(void *const context, const char &value,
8585
size_t length);
86+
void (*set_member_incoming_communication_protocol)(void *const context,
87+
const char &value,
88+
size_t length);
8689
};
8790

8891
/*

include/mysql/thread_type.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ enum enum_thread_type {
4545
SYSTEM_THREAD_DD_RESTART = 1024,
4646
SYSTEM_THREAD_SERVER_INITIALIZE = 2048,
4747
SYSTEM_THREAD_INIT_FILE = 4096,
48-
SYSTEM_THREAD_SERVER_UPGRADE = 8192
48+
SYSTEM_THREAD_SERVER_UPGRADE = 8192,
49+
SYSTEM_THREAD_GROUP_REPLICATION_CONNECTION = 16384
4950
};
5051

5152
#endif /* THREAD_TYPE_INCLUDED */

include/sql_common.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ struct MEM_ROOT;
4848
extern "C" {
4949
#endif
5050

51-
extern const char *unknown_sqlstate;
51+
#ifdef IMPORT_UNKNOWN_SQLSTATE
52+
__declspec(dllimport)
53+
#endif
54+
extern const char *unknown_sqlstate;
5255
extern const char *cant_connect_sqlstate;
5356
extern const char *not_error_sqlstate;
5457

mysql-test/collections/coverage.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
plugin/x/tests/driver/
77
unittest/gunit/xplugin
8+
unittest/gunit/libmysqlgcs
89
extra/protobuf
910
extra/icu
1011
extra/zstd

mysql-test/collections/default.push

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@
77
#
88
# Non-Windows platforms
99
#
10-
perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug-server --force --comment=all-default-debug --vardir=var-all-default --skip-combinations --unit-tests-report --no-skip --exclude-platform=windows --skip-ndb
11-
10+
perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug-server --force --comment=all-default-debug --vardir=var-all-default --skip-combinations --unit-tests-report --no-skip --exclude-platform=windows
1211
#
1312
# Windows - run RPL separately with 8 threads
1413
#
15-
perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug-server --force --comment=all-default-debug --vardir=var-all-default --skip-combinations --skip-rpl --unit-tests-report --no-skip --platform=windows --skip-ndb
14+
perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug-server --force --comment=all-default-debug --vardir=var-all-default --skip-combinations --skip-rpl --unit-tests-report --no-skip --platform=windows
1615
perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug-server --force --parallel=8 --comment=rpl-suites --vardir=var-rpl-suites --skip-combinations --suite=rpl,rpl_gtid,rpl_nogtid --platform=windows
17-
18-
#
19-
# Run all Ndb tests separately.
20-
# For builds without Ndb support no tests will be attempted.
21-
#
22-
perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug-server --force --comment=ndb --vardir=var-ndb --skip-combinations --no-skip --with-ndb-only
23-
2416
#
2517
# Group Replication
2618
perl mysql-test-run.pl --timer --force --parallel=6 --comment=group_replication --vardir=var-group_replication --suite=group_replication
19+

mysql-test/collections/default.weekly

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,20 @@ perl mysql-test-run.pl --timer --force --parallel=6 --comment=group_replication_
191191

192192
#GR with group_replication_ssl_mode = REQUIRED
193193
perl mysql-test-run.pl --timer --force --parallel=6 --comment=group_replication_ssl_mode_required --vardir=var-gr_ssl_mode_required --suite=group_replication --big-test --testcase-timeout=60 --suite-timeout=360 --mysqld=--loose-group_replication_ssl_mode=REQUIRED
194+
195+
#GR with group_replication_ssl_mode = REQUIRED and MySQL Stack
196+
perl mysql-test-run.pl --timer --force --parallel=6 --comment=group_replication_ssl_mode_required_mysql --vardir=var-gr_ssl_mode_required_mysql --suite=group_replication --big-test --testcase-timeout=60 --suite-timeout=360 --mysqld=--loose-group_replication_ssl_mode=REQUIRED --mysqld=--loose-group_replication_communication_stack=MySQL
197+
194198
#
195199
# b) DEBUG
196200
#
197201

198202
#GR with loose-group_replication_gtid_assignment_block_size=1 on debug build
199203
perl mysql-test-run.pl --timer --debug-server --force --parallel=6 --comment=group_replication_gtid_assignment_block_size_1-debug --vardir=var-gr_gtid_assignment_block_size_1-debug --suite=group_replication --big-test --testcase-timeout=60 --suite-timeout=360 --mysqld=--loose-group_replication_gtid_assignment_block_size=1
200204

205+
#GR with MySQL Stack on debug build
206+
perl mysql-test-run.pl --timer --debug-server --force --parallel=6 --comment=group_replication_mysql-debug --vardir=var-group_replication_mysql-debug --suite=group_replication --big-test --testcase-timeout=60 --suite-timeout=360 --mysqld=--loose-group_replication_communication_stack=MySQL
207+
201208
#GR with MTS on debug build
202209
perl mysql-test-run.pl --timer --debug-server --force --parallel=6 --comment=group_replication_parallel_applier-debug --vardir=var-gr_parallel_applier-debug --suite=group_replication --big-test --testcase-timeout=60 --suite-timeout=360 --mysqld=--replica-parallel-workers=4 --mysqld=--replica-parallel-type=logical_clock --mysqld=--replica_preserve_commit_order=ON
203210
perl mysql-test-run.pl --timer --debug-server --force --parallel=6 --comment=group_replication_ssl_mode_required-debug --vardir=var-gr_ssl_mode_required-debug --suite=group_replication --big-test --testcase-timeout=60 --suite-timeout=360 --mysqld=--loose-group_replication_ssl_mode=REQUIRED

mysql-test/collections/disabled.def

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,13 @@ sys_vars.innodb_log_writer_threads_basic : Bug#32129814 SYS_VARS.INNODB_LOG_WRIT
9494
sysschema.v_wait_classes_global_by_avg_latency : BUG#21550054 Test fails too often.
9595

9696
# x plugin suite tests
97+
98+
# Group Replication tests.
99+
100+
# These will only run in XCom because of the following issue:
101+
group_replication.gr_join_with_suspect_member : BUG#31704262 XCOM CREATES NODES WITH PAST GHOST VIEWS
102+
group_replication.gr_leave_with_suspect_member : BUG#31704262 XCOM CREATES NODES WITH PAST GHOST VIEWS
103+
group_replication.gr_majority_loss_restored_after_timeout : BUG#31704262 XCOM CREATES NODES WITH PAST GHOST VIEWS
104+
group_replication.gr_suspect_member_resumes_after_crash_join_retries : BUG#32458239 GR_SUSPECT_MEMBER_RESUMES_AFTER_CRASH_JOIN_RETRIES IS NOT STABLE
105+
group_replication.gr_majority_loss_5_to_2 @windows : Bug#32860569 SPORADIC GROUP REPLICATION MAJORITY TEST FAILURES IN WINDOWS
106+
group_replication.gr_majority_loss_5_to_2_recovery @windows : Bug#32860569 SPORADIC GROUP REPLICATION MAJORITY TEST FAILURES IN WINDOWS

0 commit comments

Comments
 (0)