From 817f6d1f19aa48bf87a8be8b2ec6f0d2f857613c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 20 Dec 2022 12:21:38 +0200 Subject: Add info about BF-BF lock wait --- storage/innobase/lock/lock0lock.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index e16eb83def8..2a9bb585f4c 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -713,6 +713,10 @@ lock_rec_has_to_wait( /* if BF-BF conflict, we have to look at write set order */ if (wsrep_thd_is_BF(trx->mysql_thd, FALSE) && wsrep_thd_is_BF(lock2->trx->mysql_thd, TRUE)) { + WSREP_DEBUG("lock_rec_has_to_wait: BF1 thd: %p thread: %lu trx_id %lu", + trx->mysql_thd, thd_get_thread_id(trx->mysql_thd), trx->id); + WSREP_DEBUG("lock_rec_has_to_wait: BF2 thd: %p thread: %lu trx_id %lu", + lock2->trx->mysql_thd, thd_get_thread_id(lock2->trx->mysql_thd), lock2->trx->id); mtr_t mtr; if (wsrep_debug) { WSREP_INFO("BF-BF lock conflict"); @@ -722,9 +726,11 @@ lock_rec_has_to_wait( lock2->trx->mysql_thd) && (type_mode & LOCK_MODE_MASK) == LOCK_X && (lock2->type_mode & LOCK_MODE_MASK) == LOCK_X) { + WSREP_DEBUG("lock_rec_has_to_wait: NO"); return false; } } + WSREP_DEBUG("lock_rec_has_to_wait: YES"); /* We very well can let bf to wait normally as other BF will be replayed in case of conflict. For debug builds we will do additional sanity checks to catch -- cgit v1.2.1