Merge pull request #27321 from taosdata/fix/3_liaohj
fix(stream): send kill checkpoint trans to mnode when trying to close vnode.
This commit is contained in:
commit
d5850bbcdb
|
@ -1204,11 +1204,11 @@ int32_t tqProcessTaskCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg, SRpcMsg* pRsp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.mndTrigger) {
|
if (req.mndTrigger) {
|
||||||
qInfo("s-task:%s (vgId:%d) level:%d receive checkpoint-source msg chkpt:%" PRId64 ", transId:%d, ", pTask->id.idStr,
|
tqInfo("s-task:%s (vgId:%d) level:%d receive checkpoint-source msg chkpt:%" PRId64 ", transId:%d, ", pTask->id.idStr,
|
||||||
vgId, pTask->info.taskLevel, req.checkpointId, req.transId);
|
vgId, pTask->info.taskLevel, req.checkpointId, req.transId);
|
||||||
} else {
|
} else {
|
||||||
const char* pPrevStatus = streamTaskGetStatusStr(streamTaskGetPrevStatus(pTask));
|
const char* pPrevStatus = streamTaskGetStatusStr(streamTaskGetPrevStatus(pTask));
|
||||||
qInfo("s-task:%s (vgId:%d) level:%d receive checkpoint-source msg chkpt:%" PRId64
|
tqInfo("s-task:%s (vgId:%d) level:%d receive checkpoint-source msg chkpt:%" PRId64
|
||||||
", transId:%d after transfer-state, prev status:%s",
|
", transId:%d after transfer-state, prev status:%s",
|
||||||
pTask->id.idStr, vgId, pTask->info.taskLevel, req.checkpointId, req.transId, pPrevStatus);
|
pTask->id.idStr, vgId, pTask->info.taskLevel, req.checkpointId, req.transId, pPrevStatus);
|
||||||
}
|
}
|
||||||
|
|
|
@ -901,6 +901,7 @@ int32_t tLDataIterNextRow(SLDataIter *pIter, const char *idStr, bool* hasNext) {
|
||||||
pIter->rInfo.row = tsdbRowFromBlockData(pBlockData, pIter->iRow);
|
pIter->rInfo.row = tsdbRowFromBlockData(pBlockData, pIter->iRow);
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
|
tsdbError("failed to exec stt-file nextIter, lino:%d, code:%s, %s", lino, tstrerror(code), idStr);
|
||||||
*hasNext = (code == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL) && (pBlockData != NULL);
|
*hasNext = (code == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL) && (pBlockData != NULL);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1260,7 +1260,9 @@ void streamMetaUpdateStageRole(SStreamMeta* pMeta, int64_t stage, bool isLeader)
|
||||||
pMeta->stage = stage;
|
pMeta->stage = stage;
|
||||||
|
|
||||||
// mark the sign to send msg before close all tasks
|
// mark the sign to send msg before close all tasks
|
||||||
if ((!isLeader) && (pMeta->role == NODE_ROLE_LEADER)) {
|
// 1. for leader vnode, always send msg before closing
|
||||||
|
// 2. for follower vnode, if it's is changed from leader, also sending msg before closing.
|
||||||
|
if (pMeta->role == NODE_ROLE_LEADER) {
|
||||||
pMeta->sendMsgBeforeClosing = true;
|
pMeta->sendMsgBeforeClosing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue