MW-28, codership/mysql-wsrep#28 Fix sync_thread_levels debug assert

Introduced a new wsrep_trx_print_locking() which may be called
under lock_sys->mutex if the trx has locks.

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
This commit is contained in:
Sachin Setiya 2017-03-23 15:46:11 +05:30
commit cdd1dc829b
6 changed files with 262 additions and 12 deletions

View file

@ -1752,7 +1752,6 @@ wsrep_kill_victim(
is in the queue*/
} else if (lock->trx != trx) {
if (wsrep_log_conflicts) {
mutex_enter(&trx_sys->mutex);
if (bf_this) {
fputs("\n*** Priority TRANSACTION:\n",
stderr);
@ -1761,7 +1760,7 @@ wsrep_kill_victim(
stderr);
}
trx_print_latched(stderr, trx, 3000);
wsrep_trx_print_locking(stderr, trx, 3000);
if (bf_other) {
fputs("\n*** Priority TRANSACTION:\n",
@ -1770,10 +1769,7 @@ wsrep_kill_victim(
fputs("\n*** Victim TRANSACTION:\n",
stderr);
}
trx_print_latched(stderr, lock->trx, 3000);
mutex_exit(&trx_sys->mutex);
wsrep_trx_print_locking(stderr, lock->trx, 3000);
fputs("*** WAITING FOR THIS LOCK TO BE GRANTED:\n",
stderr);