Commit fe4047dc authored by Nirbhay Choubey's avatar Nirbhay Choubey

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.
parent 080da551
......@@ -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 :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment