fix(stream): add refId for meta at the end of init functions
This commit is contained in:
parent
cbb3572fdd
commit
097d3caa90
|
@ -434,7 +434,6 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn,
|
||||||
pMeta->closeFlag = false;
|
pMeta->closeFlag = false;
|
||||||
|
|
||||||
stInfo("vgId:%d open stream meta succ, latest checkpoint:%" PRId64 ", stage:%" PRId64, vgId, pMeta->chkpId, stage);
|
stInfo("vgId:%d open stream meta succ, latest checkpoint:%" PRId64 ", stage:%" PRId64, vgId, pMeta->chkpId, stage);
|
||||||
pMeta->rid = taosAddRef(streamMetaId, pMeta);
|
|
||||||
|
|
||||||
// set the attribute when running on Linux OS
|
// set the attribute when running on Linux OS
|
||||||
TdThreadRwlockAttr attr;
|
TdThreadRwlockAttr attr;
|
||||||
|
@ -468,6 +467,9 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn,
|
||||||
code = taosThreadMutexInit(&pMeta->backendMutex, NULL);
|
code = taosThreadMutexInit(&pMeta->backendMutex, NULL);
|
||||||
TSDB_CHECK_CODE(code, lino, _err);
|
TSDB_CHECK_CODE(code, lino, _err);
|
||||||
|
|
||||||
|
// add refId at the end of initialization function
|
||||||
|
pMeta->rid = taosAddRef(streamMetaId, pMeta);
|
||||||
|
|
||||||
*p = pMeta;
|
*p = pMeta;
|
||||||
return code;
|
return code;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue