diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-12-22 15:02:18 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-12-22 15:02:18 -0500 |
commit | fe4047dc39090f626408d91999dd4a8f0869ab13 (patch) | |
tree | 2b48bfcbc21b27f5920332fd3a8bfbf8d9930c23 /sql/sql_reload.cc | |
parent | 080da551ea171f8a43633ab27b56875938643dd0 (diff) | |
download | mariadb-git-fe4047dc39090f626408d91999dd4a8f0869ab13.tar.gz |
MDEV-9224 : Database lockup on flush in galera
A deadlock can occur when the wsrep applier thread while
executing FLUSH TABLES waits for MDL lock owned by other
local transactions, which in turn are waiting for commit
order if their seqno comes after one assigned to FLUSH
TABLES.
Fixed by making sure that the wsrep applier thread while
executing FLUSH TABLES does not wait for table share(s)
to be removed from table definition cache.
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 63809fae7ee..ef699962777 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -313,6 +313,16 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, } } +#ifdef WITH_WSREP + if (thd->wsrep_applier) + { + /* + In case of applier thread, do not wait for table share(s) to be + removed from table definition cache. + */ + options|= REFRESH_FAST; + } +#endif if (close_cached_tables(thd, tables, ((options & REFRESH_FAST) ? FALSE : TRUE), (thd ? thd->variables.lock_wait_timeout : |