Commit 5aacb861 authored by Marko Mäkelä's avatar Marko Mäkelä

WSREP: Use TRX_ID_FMT for trx_id_t in messages.

parent b28adb6a
...@@ -18483,19 +18483,21 @@ wsrep_innobase_kill_one_trx( ...@@ -18483,19 +18483,21 @@ wsrep_innobase_kill_one_trx(
if (!thd) { if (!thd) {
DBUG_PRINT("wsrep", ("no thd for conflicting lock")); DBUG_PRINT("wsrep", ("no thd for conflicting lock"));
WSREP_WARN("no THD for trx: %lu", victim_trx->id); WSREP_WARN("no THD for trx: " TRX_ID_FMT, victim_trx->id);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
if (!bf_thd) { if (!bf_thd) {
DBUG_PRINT("wsrep", ("no BF thd for conflicting lock")); DBUG_PRINT("wsrep", ("no BF thd for conflicting lock"));
WSREP_WARN("no BF THD for trx: %lu", (bf_trx) ? bf_trx->id : 0); WSREP_WARN("no BF THD for trx: " TRX_ID_FMT,
bf_trx ? bf_trx->id : 0);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
WSREP_LOG_CONFLICT(bf_thd, thd, TRUE); WSREP_LOG_CONFLICT(bf_thd, thd, TRUE);
WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %lu", WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: "
TRX_ID_FMT,
signal, (long long)bf_seqno, signal, (long long)bf_seqno,
thd_get_thread_id(thd), thd_get_thread_id(thd),
victim_trx->id); victim_trx->id);
...@@ -18515,13 +18517,14 @@ wsrep_innobase_kill_one_trx( ...@@ -18515,13 +18517,14 @@ wsrep_innobase_kill_one_trx(
if (wsrep_thd_query_state(thd) == QUERY_EXITING) { if (wsrep_thd_query_state(thd) == QUERY_EXITING) {
WSREP_DEBUG("kill trx EXITING for %lu", victim_trx->id); WSREP_DEBUG("kill trx EXITING for " TRX_ID_FMT,
victim_trx->id);
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) { if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) {
WSREP_DEBUG("withdraw for BF trx: %lu, state: %d", WSREP_DEBUG("withdraw for BF trx: " TRX_ID_FMT ", state: %d",
victim_trx->id, victim_trx->id,
wsrep_thd_get_conflict_state(thd)); wsrep_thd_get_conflict_state(thd));
} }
...@@ -18531,7 +18534,7 @@ wsrep_innobase_kill_one_trx( ...@@ -18531,7 +18534,7 @@ wsrep_innobase_kill_one_trx(
wsrep_thd_set_conflict_state(thd, MUST_ABORT); wsrep_thd_set_conflict_state(thd, MUST_ABORT);
break; break;
case MUST_ABORT: case MUST_ABORT:
WSREP_DEBUG("victim %lu in MUST ABORT state", WSREP_DEBUG("victim " TRX_ID_FMT " in MUST ABORT state",
victim_trx->id); victim_trx->id);
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
...@@ -18540,7 +18543,7 @@ wsrep_innobase_kill_one_trx( ...@@ -18540,7 +18543,7 @@ wsrep_innobase_kill_one_trx(
case ABORTED: case ABORTED:
case ABORTING: // fall through case ABORTING: // fall through
default: default:
WSREP_DEBUG("victim %lu in state %d", WSREP_DEBUG("victim " TRX_ID_FMT " in state %d",
victim_trx->id, wsrep_thd_get_conflict_state(thd)); victim_trx->id, wsrep_thd_get_conflict_state(thd));
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -18553,7 +18556,7 @@ wsrep_innobase_kill_one_trx( ...@@ -18553,7 +18556,7 @@ wsrep_innobase_kill_one_trx(
WSREP_DEBUG("kill query for: %ld", WSREP_DEBUG("kill query for: %ld",
thd_get_thread_id(thd)); thd_get_thread_id(thd));
WSREP_DEBUG("kill trx QUERY_COMMITTING for %lu", WSREP_DEBUG("kill trx QUERY_COMMITTING for " TRX_ID_FMT,
victim_trx->id); victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) { if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
...@@ -18568,7 +18571,8 @@ wsrep_innobase_kill_one_trx( ...@@ -18568,7 +18571,8 @@ wsrep_innobase_kill_one_trx(
switch (rcode) { switch (rcode) {
case WSREP_WARNING: case WSREP_WARNING:
WSREP_DEBUG("cancel commit warning: %lu", WSREP_DEBUG("cancel commit warning: "
TRX_ID_FMT,
victim_trx->id); victim_trx->id);
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
...@@ -18578,7 +18582,8 @@ wsrep_innobase_kill_one_trx( ...@@ -18578,7 +18582,8 @@ wsrep_innobase_kill_one_trx(
break; break;
default: default:
WSREP_ERROR( WSREP_ERROR(
"cancel commit bad exit: %d %lu", "cancel commit bad exit: %d "
TRX_ID_FMT,
rcode, rcode,
victim_trx->id); victim_trx->id);
/* unable to interrupt, must abort */ /* unable to interrupt, must abort */
...@@ -18596,7 +18601,8 @@ wsrep_innobase_kill_one_trx( ...@@ -18596,7 +18601,8 @@ wsrep_innobase_kill_one_trx(
/* it is possible that victim trx is itself waiting for some /* it is possible that victim trx is itself waiting for some
* other lock. We need to cancel this waiting * other lock. We need to cancel this waiting
*/ */
WSREP_DEBUG("kill trx QUERY_EXEC for %lu", victim_trx->id); WSREP_DEBUG("kill trx QUERY_EXEC for " TRX_ID_FMT,
victim_trx->id);
victim_trx->lock.was_chosen_as_deadlock_victim= TRUE; victim_trx->lock.was_chosen_as_deadlock_victim= TRUE;
if (victim_trx->lock.wait_lock) { if (victim_trx->lock.wait_lock) {
...@@ -18631,7 +18637,7 @@ wsrep_innobase_kill_one_trx( ...@@ -18631,7 +18637,7 @@ wsrep_innobase_kill_one_trx(
break; break;
case QUERY_IDLE: case QUERY_IDLE:
{ {
WSREP_DEBUG("kill IDLE for %lu", victim_trx->id); WSREP_DEBUG("kill IDLE for " TRX_ID_FMT, victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) { if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
WSREP_DEBUG("kill BF IDLE, seqno: %lld", WSREP_DEBUG("kill BF IDLE, seqno: %lld",
......
...@@ -19628,19 +19628,21 @@ wsrep_innobase_kill_one_trx( ...@@ -19628,19 +19628,21 @@ wsrep_innobase_kill_one_trx(
if (!thd) { if (!thd) {
DBUG_PRINT("wsrep", ("no thd for conflicting lock")); DBUG_PRINT("wsrep", ("no thd for conflicting lock"));
WSREP_WARN("no THD for trx: %lu", victim_trx->id); WSREP_WARN("no THD for trx: " TRX_ID_FMT, victim_trx->id);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
if (!bf_thd) { if (!bf_thd) {
DBUG_PRINT("wsrep", ("no BF thd for conflicting lock")); DBUG_PRINT("wsrep", ("no BF thd for conflicting lock"));
WSREP_WARN("no BF THD for trx: %lu", (bf_trx) ? bf_trx->id : 0); WSREP_WARN("no BF THD for trx: " TRX_ID_FMT,
bf_trx ? bf_trx->id : 0);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
WSREP_LOG_CONFLICT(bf_thd, thd, TRUE); WSREP_LOG_CONFLICT(bf_thd, thd, TRUE);
WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %lu", WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: "
TRX_ID_FMT,
signal, (long long)bf_seqno, signal, (long long)bf_seqno,
thd_get_thread_id(thd), thd_get_thread_id(thd),
victim_trx->id); victim_trx->id);
...@@ -19660,13 +19662,14 @@ wsrep_innobase_kill_one_trx( ...@@ -19660,13 +19662,14 @@ wsrep_innobase_kill_one_trx(
if (wsrep_thd_query_state(thd) == QUERY_EXITING) { if (wsrep_thd_query_state(thd) == QUERY_EXITING) {
WSREP_DEBUG("kill trx EXITING for %lu", victim_trx->id); WSREP_DEBUG("kill trx EXITING for " TRX_ID_FMT,
victim_trx->id);
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) { if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) {
WSREP_DEBUG("withdraw for BF trx: %lu, state: %d", WSREP_DEBUG("withdraw for BF trx: " TRX_ID_FMT ", state: %d",
victim_trx->id, victim_trx->id,
wsrep_thd_get_conflict_state(thd)); wsrep_thd_get_conflict_state(thd));
} }
...@@ -19676,7 +19679,7 @@ wsrep_innobase_kill_one_trx( ...@@ -19676,7 +19679,7 @@ wsrep_innobase_kill_one_trx(
wsrep_thd_set_conflict_state(thd, MUST_ABORT); wsrep_thd_set_conflict_state(thd, MUST_ABORT);
break; break;
case MUST_ABORT: case MUST_ABORT:
WSREP_DEBUG("victim %lu in MUST ABORT state", WSREP_DEBUG("victim " TRX_ID_FMT " in MUST ABORT state",
victim_trx->id); victim_trx->id);
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
...@@ -19685,7 +19688,7 @@ wsrep_innobase_kill_one_trx( ...@@ -19685,7 +19688,7 @@ wsrep_innobase_kill_one_trx(
case ABORTED: case ABORTED:
case ABORTING: // fall through case ABORTING: // fall through
default: default:
WSREP_DEBUG("victim %lu in state %d", WSREP_DEBUG("victim " TRX_ID_FMT " in state %d",
victim_trx->id, wsrep_thd_get_conflict_state(thd)); victim_trx->id, wsrep_thd_get_conflict_state(thd));
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -19698,7 +19701,7 @@ wsrep_innobase_kill_one_trx( ...@@ -19698,7 +19701,7 @@ wsrep_innobase_kill_one_trx(
WSREP_DEBUG("kill query for: %ld", WSREP_DEBUG("kill query for: %ld",
thd_get_thread_id(thd)); thd_get_thread_id(thd));
WSREP_DEBUG("kill trx QUERY_COMMITTING for %lu", WSREP_DEBUG("kill trx QUERY_COMMITTING for " TRX_ID_FMT,
victim_trx->id); victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) { if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
...@@ -19713,7 +19716,8 @@ wsrep_innobase_kill_one_trx( ...@@ -19713,7 +19716,8 @@ wsrep_innobase_kill_one_trx(
switch (rcode) { switch (rcode) {
case WSREP_WARNING: case WSREP_WARNING:
WSREP_DEBUG("cancel commit warning: %lu", WSREP_DEBUG("cancel commit warning: "
TRX_ID_FMT,
victim_trx->id); victim_trx->id);
wsrep_thd_UNLOCK(thd); wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
...@@ -19723,7 +19727,8 @@ wsrep_innobase_kill_one_trx( ...@@ -19723,7 +19727,8 @@ wsrep_innobase_kill_one_trx(
break; break;
default: default:
WSREP_ERROR( WSREP_ERROR(
"cancel commit bad exit: %d %lu", "cancel commit bad exit: %d "
TRX_ID_FMT,
rcode, rcode,
victim_trx->id); victim_trx->id);
/* unable to interrupt, must abort */ /* unable to interrupt, must abort */
...@@ -19741,7 +19746,8 @@ wsrep_innobase_kill_one_trx( ...@@ -19741,7 +19746,8 @@ wsrep_innobase_kill_one_trx(
/* it is possible that victim trx is itself waiting for some /* it is possible that victim trx is itself waiting for some
* other lock. We need to cancel this waiting * other lock. We need to cancel this waiting
*/ */
WSREP_DEBUG("kill trx QUERY_EXEC for %lu", victim_trx->id); WSREP_DEBUG("kill trx QUERY_EXEC for " TRX_ID_FMT,
victim_trx->id);
victim_trx->lock.was_chosen_as_deadlock_victim= TRUE; victim_trx->lock.was_chosen_as_deadlock_victim= TRUE;
if (victim_trx->lock.wait_lock) { if (victim_trx->lock.wait_lock) {
...@@ -19776,7 +19782,7 @@ wsrep_innobase_kill_one_trx( ...@@ -19776,7 +19782,7 @@ wsrep_innobase_kill_one_trx(
break; break;
case QUERY_IDLE: case QUERY_IDLE:
{ {
WSREP_DEBUG("kill IDLE for %lu", victim_trx->id); WSREP_DEBUG("kill IDLE for " TRX_ID_FMT, victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) { if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
WSREP_DEBUG("kill BF IDLE, seqno: %lld", WSREP_DEBUG("kill BF IDLE, seqno: %lld",
......
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