diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-03-09 09:00:14 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-03-09 12:19:11 +0200 |
commit | 2bf4e574ad732d934016fe93e7297c017385ff68 (patch) | |
tree | 983b44fb69e24b0f80193d2f0b253035ab3dc2a0 /sql/events.cc | |
parent | d7f74150e5ab3c25c6ae9638bf21787c86c0f656 (diff) | |
download | mariadb-git-2bf4e574ad732d934016fe93e7297c017385ff68.tar.gz |
MDEV-21758 : Events switched randomly to SLAVESIDE_DISABLED
Change events only on Galera environment where idea is that
event is enabled only on one node of the cluster and nodes
are identified by server_id.
Diffstat (limited to 'sql/events.cc')
-rw-r--r-- | sql/events.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/events.cc b/sql/events.cc index c189354d5eb..c5dc51ab83d 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -1201,9 +1201,9 @@ Events::load_events_from_db(THD *thd) #ifdef WITH_WSREP /** - IF SST is done from a galera node that is also acting as MASTER - newly synced node in galera eco-system will also copy-over the event state - enabling duplicate event in galera eco-system. + If SST is done from a galera node that is also acting as MASTER + newly synced node in galera eco-system will also copy-over the + event state enabling duplicate event in galera eco-system. DISABLE such events if the current node is not event orginator. (Also, make sure you skip disabling it if is already disabled to avoid creation of redundant action) @@ -1213,7 +1213,7 @@ Events::load_events_from_db(THD *thd) Infact, based on galera use-case it seems like it recommends to have each node with different server-id. */ - if (et->originator != thd->variables.server_id) + if (WSREP(thd) && et->originator != thd->variables.server_id) { if (et->status == Event_parse_data::SLAVESIDE_DISABLED) continue; |