diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-12-14 11:33:52 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-12-14 11:33:52 -0500 |
commit | 18173ddfc4081407832d9a6703d1b8356b7defe9 (patch) | |
tree | 256d4a448cdadc5adfa5f75445d1906d3b7aef2c /sql/sql_class.cc | |
parent | 4437f51682b22caaf2cf0b00de1bf6fa3edf6557 (diff) | |
download | mariadb-git-18173ddfc4081407832d9a6703d1b8356b7defe9.tar.gz |
MDEV-9162 : MariaDB Galera Cluster memory leak on async slave node
As galera node (slave) received query log events from an async
replication master, it partially wrote the updates made to replication
state table (mysql.gtid_slave_pos) to galera transaction writeset post
TOI. As a result, the transaction handle, thus created within galera,
was never freed/purged as the corresponding trx did not commit.
Thus, it kept piling up for every query log event and was only reclaimed
upon server shutdown when the transaction map object got destructed.
Fixed by making sure that updates in replication slave state table
are not written to galera transaction writeset and thus, not replicated
to other nodes.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5f1714558eb..6c7282c3505 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -962,6 +962,10 @@ extern "C" int wsrep_thd_retry_counter(THD *thd) { return(thd->wsrep_retry_counter); } +extern "C" bool wsrep_thd_skip_append_keys(THD *thd) +{ + return thd->wsrep_skip_append_keys; +} extern int wsrep_trx_order_before(void *thd1, void *thd2) @@ -1083,7 +1087,8 @@ THD::THD() wsrep_po_cnt(0), wsrep_po_in_trans(FALSE), wsrep_apply_format(0), - wsrep_apply_toi(false) + wsrep_apply_toi(false), + wsrep_skip_append_keys(false) #endif { ulong tmp; |