refactor: opt perf by avoid save tasks during restoring
This commit is contained in:
parent
445605ed22
commit
23341e1bdf
|
@ -152,9 +152,8 @@ int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tqDebug("s-task:%s start to save task", pTask->id.idStr);
|
if (restored) {
|
||||||
|
tqDebug("s-task:%s vgId:%d start to save task", pTask->id.idStr, vgId);
|
||||||
{
|
|
||||||
streamMetaSaveTask(pMeta, pTask);
|
streamMetaSaveTask(pMeta, pTask);
|
||||||
if (ppHTask != NULL) {
|
if (ppHTask != NULL) {
|
||||||
streamMetaSaveTask(pMeta, *ppHTask);
|
streamMetaSaveTask(pMeta, *ppHTask);
|
||||||
|
@ -163,10 +162,11 @@ int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pM
|
||||||
if (streamMetaCommit(pMeta) < 0) {
|
if (streamMetaCommit(pMeta) < 0) {
|
||||||
// persist to disk
|
// persist to disk
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
tqDebug("s-task:%s vgId:%d not save since restore not finish", pTask->id.idStr, vgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
tqDebug("s-task:%s start to stop task after save task", pTask->id.idStr);
|
tqDebug("s-task:%s start to stop task after save task", pTask->id.idStr);
|
||||||
|
|
||||||
streamTaskStop(pTask);
|
streamTaskStop(pTask);
|
||||||
|
|
||||||
// keep the already handled info
|
// keep the already handled info
|
||||||
|
|
Loading…
Reference in New Issue