mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 09:55:45 +02:00
fix server: fix deadlock blmove does not conclude on error (#4561)
* fix deadlock: fix blmove does not conclude on error --------- Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
af5a21bdac
commit
5337711976
3 changed files with 6 additions and 3 deletions
|
@ -872,7 +872,7 @@ EngineShard::TxQueueInfo EngineShard::AnalyzeTxQueue() const {
|
||||||
{
|
{
|
||||||
auto value = queue->At(cur);
|
auto value = queue->At(cur);
|
||||||
Transaction* trx = std::get<Transaction*>(value);
|
Transaction* trx = std::get<Transaction*>(value);
|
||||||
info.head.debug_id_info = trx->DebugId();
|
info.head.debug_id_info = trx->DebugId(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -1050,6 +1050,7 @@ OpResult<string> BPopPusher::RunPair(time_point tp, Transaction* tx, ConnectionC
|
||||||
if (op_res.status() == OpStatus::KEY_NOTFOUND) {
|
if (op_res.status() == OpStatus::KEY_NOTFOUND) {
|
||||||
op_res = OpStatus::TIMED_OUT;
|
op_res = OpStatus::TIMED_OUT;
|
||||||
}
|
}
|
||||||
|
tx->Conclude();
|
||||||
return op_res;
|
return op_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ void AnalyzeTxQueue(const EngineShard* shard, const TxQueue* txq) {
|
||||||
", poll_executions:", shard->stats().poll_execution_total);
|
", poll_executions:", shard->stats().poll_execution_total);
|
||||||
const Transaction* cont_tx = shard->GetContTx();
|
const Transaction* cont_tx = shard->GetContTx();
|
||||||
if (cont_tx) {
|
if (cont_tx) {
|
||||||
absl::StrAppend(&msg, " continuation_tx: ", cont_tx->DebugId(), " ",
|
absl::StrAppend(&msg, " continuation_tx: ", cont_tx->DebugId(shard->shard_id()), " ",
|
||||||
cont_tx->DEBUG_IsArmedInShard(shard->shard_id()) ? " armed" : "");
|
cont_tx->DEBUG_IsArmedInShard(shard->shard_id()) ? " armed" : "");
|
||||||
}
|
}
|
||||||
absl::StrAppend(&msg, "\nTxQueue head debug info ", info.head.debug_id_info);
|
absl::StrAppend(&msg, "\nTxQueue head debug info ", info.head.debug_id_info);
|
||||||
|
@ -558,7 +558,9 @@ string Transaction::DebugId(std::optional<ShardId> sid) const {
|
||||||
absl::StrAppend(&res, " {id=", trans_id(this));
|
absl::StrAppend(&res, " {id=", trans_id(this));
|
||||||
if (sid) {
|
if (sid) {
|
||||||
absl::StrAppend(&res, ",mask[", *sid, "]=", int(shard_data_[SidToId(*sid)].local_mask),
|
absl::StrAppend(&res, ",mask[", *sid, "]=", int(shard_data_[SidToId(*sid)].local_mask),
|
||||||
",txqpos[]=", shard_data_[SidToId(*sid)].pq_pos);
|
",is_armed=", DEBUG_IsArmedInShard(*sid),
|
||||||
|
",txqpos[]=", shard_data_[SidToId(*sid)].pq_pos,
|
||||||
|
",fail_state_print=", DEBUG_PrintFailState(*sid));
|
||||||
}
|
}
|
||||||
absl::StrAppend(&res, "}");
|
absl::StrAppend(&res, "}");
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue