refactor: opt perf by avoid save tasks during restoring

This commit is contained in:
Haojun Liao 2024-01-05 22:58:43 +08:00
parent 445605ed22
commit 23341e1bdf
1 changed files with 4 additions and 4 deletions

View File

@ -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);
if (ppHTask != NULL) {
streamMetaSaveTask(pMeta, *ppHTask);
@ -163,10 +162,11 @@ int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pM
if (streamMetaCommit(pMeta) < 0) {
// 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);
streamTaskStop(pTask);
// keep the already handled info