refactor(stream): not generated hb when trying to restart tasks.
This commit is contained in:
parent
b6707fbbd2
commit
e74ae6fc05
|
@ -363,14 +363,18 @@ void streamMetaHbToMnode(void* param, void* tmrId) {
|
||||||
pMeta->pHbInfo->hbStart = taosGetTimestampMs();
|
pMeta->pHbInfo->hbStart = taosGetTimestampMs();
|
||||||
}
|
}
|
||||||
|
|
||||||
streamMetaRLock(pMeta);
|
// NOTE: stream task in restart procedure. not generate the hb now, try to acquire the lock may cause stuck this timer.
|
||||||
code = streamMetaSendHbHelper(pMeta);
|
if (pMeta->startInfo.startAllTasks == 1) {
|
||||||
if (code) {
|
stWarn("vgId:%d in restart all task procedure, not try to genbrate the hb now, try again in 5s", pMeta->vgId);
|
||||||
stError("vgId:%d failed to send hmMsg to mnode, try again in 5s, code:%s", pMeta->vgId, tstrerror(code));
|
} else {
|
||||||
|
streamMetaRLock(pMeta);
|
||||||
|
code = streamMetaSendHbHelper(pMeta);
|
||||||
|
if (code) {
|
||||||
|
stError("vgId:%d failed to send hmMsg to mnode, try again in 5s, code:%s", pMeta->vgId, tstrerror(code));
|
||||||
|
}
|
||||||
|
streamMetaRUnLock(pMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
streamMetaRUnLock(pMeta);
|
|
||||||
|
|
||||||
streamTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, param, streamTimer, &pMeta->pHbInfo->hbTmr, pMeta->vgId,
|
streamTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, param, streamTimer, &pMeta->pHbInfo->hbTmr, pMeta->vgId,
|
||||||
"meta-hb-tmr");
|
"meta-hb-tmr");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue