Thanks for the report.
The regression was introduced by this commit:
commit 0fd5b11eb05be8e8e996b26d845aae3b863448d3
|
Author: Jan Lindström <jan.lindstrom@mariadb.com>
|
Date: Fri Sep 6 14:54:22 2019 +0300
|
|
MDEV-20511: Galera replication of events is not consistent
|
|
After SST from master node (the one where event is ENABLED) - you will end up with the event enabled on two nodes, hence it's now being executed twice. It can be solved by comparing event's originator with server_id. if not equal, then change its status to 'SLAVESIDE_DISABLED'
|
The change makes all events which were created by a server with a different server_id to get disabled. Moreover, they remain disabled even if the server is later started with the initial server_id again.
create event ev on schedule every 1 minute do set @a= 1;
|
select name, originator, status from mysql.event;
|
|
--let $server_id= `SELECT @@global.server_id`
|
|
--echo #
|
--echo # Restarting server with server_id=100
|
--echo #
|
--let $restart_parameters= --server-id=100
|
--source include/restart_mysqld.inc
|
|
select @@global.server_id;
|
select name, originator, status from mysql.event;
|
--eval set global server_id= $server_id
|
|
--echo #
|
--echo # Restarting server with the original server_id=$server_id
|
--echo #
|
--let $restart_parameters=
|
--source include/restart_mysqld.inc
|
|
select @@global.server_id;
|
select name, originator, status from mysql.event;
|
|
# Cleanup
|
drop event ev;
|
10.2 8382f106
|
select name, originator, status from mysql.event;
|
name originator status
|
ev 1 ENABLED
|
#
|
# Restarting server with server_id=100
|
#
|
select @@global.server_id;
|
@@global.server_id
|
100
|
select name, originator, status from mysql.event;
|
name originator status
|
ev 1 SLAVESIDE_DISABLED
|
set global server_id= 1;
|
#
|
# Restarting server with the original server_id=1
|
#
|
select @@global.server_id;
|
@@global.server_id
|
1
|
select name, originator, status from mysql.event;
|
name originator status
|
ev 1 SLAVESIDE_DISABLED
|
Thanks for the report.
The regression was introduced by this commit:
commit 0fd5b11eb05be8e8e996b26d845aae3b863448d3
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Fri Sep 6 14:54:22 2019 +0300
MDEV-20511: Galera replication of events is not consistent
After SST from master node (the one where event is ENABLED) - you will end up with the event enabled on two nodes, hence it's now being executed twice. It can be solved by comparing event's originator with server_id. if not equal, then change its status to 'SLAVESIDE_DISABLED'
The change makes all events which were created by a server with a different server_id to get disabled. Moreover, they remain disabled even if the server is later started with the initial server_id again.
--let $server_id= `SELECT @@global.server_id`
--echo #
--echo # Restarting server with server_id=100
--echo #
--let $restart_parameters= --server-id=100
--source include/restart_mysqld.inc
--eval set global server_id= $server_id
--echo #
--echo # Restarting server with the original server_id=$server_id
--echo #
--let $restart_parameters=
--source include/restart_mysqld.inc
# Cleanup
10.2 8382f106
ev 1 ENABLED
#
#
100
ev 1 SLAVESIDE_DISABLED
#
#
1
ev 1 SLAVESIDE_DISABLED