fix(stream): avoid clear the restart flag .
This commit is contained in:
parent
c7285c0ede
commit
85befa10b9
|
@ -211,7 +211,7 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandF
|
||||||
stage);
|
stage);
|
||||||
return pMeta;
|
return pMeta;
|
||||||
|
|
||||||
_err:
|
_err:
|
||||||
taosMemoryFree(pMeta->path);
|
taosMemoryFree(pMeta->path);
|
||||||
if (pMeta->pTasksMap) taosHashCleanup(pMeta->pTasksMap);
|
if (pMeta->pTasksMap) taosHashCleanup(pMeta->pTasksMap);
|
||||||
if (pMeta->pTaskList) taosArrayDestroy(pMeta->pTaskList);
|
if (pMeta->pTaskList) taosArrayDestroy(pMeta->pTaskList);
|
||||||
|
@ -228,8 +228,12 @@ _err:
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t streamMetaReopen(SStreamMeta* pMeta) {
|
int32_t streamMetaReopen(SStreamMeta* pMeta) {
|
||||||
|
// backup the restart flag
|
||||||
|
int32_t restartFlag = pMeta->startInfo.startedAfterNodeUpdate;
|
||||||
streamMetaClear(pMeta);
|
streamMetaClear(pMeta);
|
||||||
|
|
||||||
|
pMeta->startInfo.startedAfterNodeUpdate = restartFlag;
|
||||||
|
|
||||||
// NOTE: role should not be changed during reopen meta
|
// NOTE: role should not be changed during reopen meta
|
||||||
pMeta->streamBackendRid = -1;
|
pMeta->streamBackendRid = -1;
|
||||||
pMeta->streamBackend = NULL;
|
pMeta->streamBackend = NULL;
|
||||||
|
@ -1103,4 +1107,5 @@ void streamMetaInitForSnode(SStreamMeta* pMeta) {
|
||||||
void streamMetaResetStartInfo(STaskStartInfo* pStartInfo) {
|
void streamMetaResetStartInfo(STaskStartInfo* pStartInfo) {
|
||||||
taosHashClear(pStartInfo->pReadyTaskSet);
|
taosHashClear(pStartInfo->pReadyTaskSet);
|
||||||
pStartInfo->startedAfterNodeUpdate = 0;
|
pStartInfo->startedAfterNodeUpdate = 0;
|
||||||
|
pStartInfo->readyTs = 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue