diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-12-19 10:34:19 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-12-19 10:34:19 +0200 |
commit | b04179c72e00aa277a0da2476bbc313a780e3453 (patch) | |
tree | e0eeb30a8c18bb02d36b3392456fed6a8b3d1a00 | |
parent | 4a22f1243b41802fa055b40177059fb8cd378b0c (diff) | |
download | mariadb-git-b04179c72e00aa277a0da2476bbc313a780e3453.tar.gz |
Additional instrumentation
-rw-r--r-- | sql/service_wsrep.cc | 3 | ||||
-rw-r--r-- | sql/wsrep_thd.cc | 5 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 9 |
3 files changed, 14 insertions, 3 deletions
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index 4bb769703be..9247dbf8370 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -224,6 +224,8 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd, { mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill); mysql_mutex_assert_not_owner(&victim_thd->LOCK_thd_data); + WSREP_DEBUG("JAN2: wsrep_thd_bf_abort: bf thd: %p victim thd %p", bf_thd, victim_thd); + my_bool ret= wsrep_bf_abort(bf_thd, victim_thd); /* Send awake signal if victim was BF aborted or does not @@ -247,6 +249,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd, mysql_mutex_unlock(&victim_thd->LOCK_thd_data); } else { WSREP_DEBUG("wsrep_thd_bf_abort skipped awake"); + WSREP_DEBUG("JAN3: wsrep_thd_bf_abort: bf thd: %p victim thd %p", bf_thd, victim_thd); } return ret; } diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index e610d3a6c2b..8919a06b4ea 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -345,6 +345,9 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd) WSREP_LOG_THD(bf_thd, "BF aborter before"); WSREP_LOG_THD(victim_thd, "victim before"); + WSREP_DEBUG("JAN3: wsrep_thd_abort: bf thd: %p victim thd %p", bf_thd, victim_thd); + + #ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("sync.wsrep_bf_abort", { @@ -388,7 +391,9 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd) else { DBUG_ASSERT(WSREP(victim_thd) ? victim_thd->wsrep_trx().active() : 1); + WSREP_DEBUG("JAN4: victim_thd->wsrep_cs().bf_abort before: bf thd: %p victim thd %p", bf_thd, victim_thd); ret= victim_thd->wsrep_cs().bf_abort(bf_seqno); + WSREP_DEBUG("JAN5: victim_thd->wsrep_cs().bf_abort after: bf thd: %p victim thd %p", bf_thd, victim_thd); } if (ret) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index f4cbb692619..45e72b6d81f 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -18636,9 +18636,10 @@ void lock_wait_wsrep_kill(trx_t *bf_trx, ulong thd_id, trx_id_t trx_id) /* fall through */ case TRX_STATE_ACTIVE: WSREP_LOG_CONFLICT(bf_thd, vthd, TRUE); - WSREP_DEBUG("Aborter BF trx_id: " TRX_ID_FMT " thread: %ld " + WSREP_DEBUG("Aborter BF THD: %p trx_id: " TRX_ID_FMT " thread: %ld " "seqno: %lld client_state: %s " "client_mode: %s transaction_mode: %s query: %s", + bf_thd, bf_trx->id, thd_get_thread_id(bf_thd), wsrep_thd_trx_seqno(bf_thd), @@ -18646,10 +18647,11 @@ void lock_wait_wsrep_kill(trx_t *bf_trx, ulong thd_id, trx_id_t trx_id) wsrep_thd_client_mode_str(bf_thd), wsrep_thd_transaction_state_str(bf_thd), wsrep_thd_query(bf_thd)); - WSREP_DEBUG("Victim %s trx_id: " TRX_ID_FMT " thread: %ld " + WSREP_DEBUG("Victim %s THD: %p trx_id: " TRX_ID_FMT " thread: %ld " "seqno: %lld client_state: %s " "client_mode: %s transaction_mode: %s query: %s", wsrep_thd_is_BF(vthd, false) ? "BF" : "normal", + vthd, vtrx->id, thd_get_thread_id(vthd), wsrep_thd_trx_seqno(vthd), @@ -18677,12 +18679,13 @@ void lock_wait_wsrep_kill(trx_t *bf_trx, ulong thd_id, trx_id_t trx_id) lock_sys.cancel_lock_wait_for_trx(vtrx); DEBUG_SYNC(bf_thd, "before_wsrep_thd_abort"); + WSREP_DEBUG("JAN: wsrep_thd_bf_abort: bf thd: %p victim thd %p", bf_thd, vthd); if (!wsrep_thd_bf_abort(bf_thd, vthd, true)) { wsrep_thd_LOCK(bf_thd); wsrep_thd_set_wsrep_aborter(NULL, bf_thd); wsrep_thd_UNLOCK(bf_thd); - WSREP_DEBUG("wsrep_thd_bf_abort has failed, victim will survive"); + WSREP_DEBUG("wsrep_thd_bf_abort has failed, victim thd %p will survive", vthd); } } wsrep_thd_kill_UNLOCK(vthd); |