mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
WSREP: Use TRX_ID_FMT for trx_id_t in messages.
This commit is contained in:
parent
b28adb6a62
commit
5aacb861f2
2 changed files with 36 additions and 24 deletions
|
@ -18483,19 +18483,21 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
if (!thd) {
|
||||
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);
|
||||
}
|
||||
|
||||
if (!bf_thd) {
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
thd_get_thread_id(thd),
|
||||
victim_trx->id);
|
||||
|
@ -18515,13 +18517,14 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
|
||||
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);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
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,
|
||||
wsrep_thd_get_conflict_state(thd));
|
||||
}
|
||||
|
@ -18531,7 +18534,7 @@ wsrep_innobase_kill_one_trx(
|
|||
wsrep_thd_set_conflict_state(thd, MUST_ABORT);
|
||||
break;
|
||||
case MUST_ABORT:
|
||||
WSREP_DEBUG("victim %lu in MUST ABORT state",
|
||||
WSREP_DEBUG("victim " TRX_ID_FMT " in MUST ABORT state",
|
||||
victim_trx->id);
|
||||
wsrep_thd_UNLOCK(thd);
|
||||
wsrep_thd_awake(thd, signal);
|
||||
|
@ -18540,7 +18543,7 @@ wsrep_innobase_kill_one_trx(
|
|||
case ABORTED:
|
||||
case ABORTING: // fall through
|
||||
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));
|
||||
wsrep_thd_UNLOCK(thd);
|
||||
DBUG_RETURN(0);
|
||||
|
@ -18553,7 +18556,7 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
WSREP_DEBUG("kill query for: %ld",
|
||||
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);
|
||||
|
||||
if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
|
||||
|
@ -18568,7 +18571,8 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
switch (rcode) {
|
||||
case WSREP_WARNING:
|
||||
WSREP_DEBUG("cancel commit warning: %lu",
|
||||
WSREP_DEBUG("cancel commit warning: "
|
||||
TRX_ID_FMT,
|
||||
victim_trx->id);
|
||||
wsrep_thd_UNLOCK(thd);
|
||||
wsrep_thd_awake(thd, signal);
|
||||
|
@ -18578,7 +18582,8 @@ wsrep_innobase_kill_one_trx(
|
|||
break;
|
||||
default:
|
||||
WSREP_ERROR(
|
||||
"cancel commit bad exit: %d %lu",
|
||||
"cancel commit bad exit: %d "
|
||||
TRX_ID_FMT,
|
||||
rcode,
|
||||
victim_trx->id);
|
||||
/* unable to interrupt, must abort */
|
||||
|
@ -18596,7 +18601,8 @@ wsrep_innobase_kill_one_trx(
|
|||
/* it is possible that victim trx is itself waiting for some
|
||||
* 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;
|
||||
if (victim_trx->lock.wait_lock) {
|
||||
|
@ -18631,7 +18637,7 @@ wsrep_innobase_kill_one_trx(
|
|||
break;
|
||||
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) {
|
||||
WSREP_DEBUG("kill BF IDLE, seqno: %lld",
|
||||
|
|
|
@ -19628,19 +19628,21 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
if (!thd) {
|
||||
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);
|
||||
}
|
||||
|
||||
if (!bf_thd) {
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
thd_get_thread_id(thd),
|
||||
victim_trx->id);
|
||||
|
@ -19660,13 +19662,14 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
|
||||
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);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
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,
|
||||
wsrep_thd_get_conflict_state(thd));
|
||||
}
|
||||
|
@ -19676,7 +19679,7 @@ wsrep_innobase_kill_one_trx(
|
|||
wsrep_thd_set_conflict_state(thd, MUST_ABORT);
|
||||
break;
|
||||
case MUST_ABORT:
|
||||
WSREP_DEBUG("victim %lu in MUST ABORT state",
|
||||
WSREP_DEBUG("victim " TRX_ID_FMT " in MUST ABORT state",
|
||||
victim_trx->id);
|
||||
wsrep_thd_UNLOCK(thd);
|
||||
wsrep_thd_awake(thd, signal);
|
||||
|
@ -19685,7 +19688,7 @@ wsrep_innobase_kill_one_trx(
|
|||
case ABORTED:
|
||||
case ABORTING: // fall through
|
||||
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));
|
||||
wsrep_thd_UNLOCK(thd);
|
||||
DBUG_RETURN(0);
|
||||
|
@ -19698,7 +19701,7 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
WSREP_DEBUG("kill query for: %ld",
|
||||
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);
|
||||
|
||||
if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
|
||||
|
@ -19713,7 +19716,8 @@ wsrep_innobase_kill_one_trx(
|
|||
|
||||
switch (rcode) {
|
||||
case WSREP_WARNING:
|
||||
WSREP_DEBUG("cancel commit warning: %lu",
|
||||
WSREP_DEBUG("cancel commit warning: "
|
||||
TRX_ID_FMT,
|
||||
victim_trx->id);
|
||||
wsrep_thd_UNLOCK(thd);
|
||||
wsrep_thd_awake(thd, signal);
|
||||
|
@ -19723,7 +19727,8 @@ wsrep_innobase_kill_one_trx(
|
|||
break;
|
||||
default:
|
||||
WSREP_ERROR(
|
||||
"cancel commit bad exit: %d %lu",
|
||||
"cancel commit bad exit: %d "
|
||||
TRX_ID_FMT,
|
||||
rcode,
|
||||
victim_trx->id);
|
||||
/* unable to interrupt, must abort */
|
||||
|
@ -19741,7 +19746,8 @@ wsrep_innobase_kill_one_trx(
|
|||
/* it is possible that victim trx is itself waiting for some
|
||||
* 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;
|
||||
if (victim_trx->lock.wait_lock) {
|
||||
|
@ -19776,7 +19782,7 @@ wsrep_innobase_kill_one_trx(
|
|||
break;
|
||||
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) {
|
||||
WSREP_DEBUG("kill BF IDLE, seqno: %lld",
|
||||
|
|
Loading…
Reference in a new issue