1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.
This commit is contained in:
Nirbhay Choubey
2015-12-22 15:02:18 -05:00
parent 080da551ea
commit fe4047dc39

View File

@ -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 :