From 69f6c3eb5149033e3d3af4438f9ec452e90f8178 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 29 Oct 2024 18:45:30 +0800 Subject: [PATCH] fix(stream): adjust init ref position. --- source/libs/stream/src/streamMeta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 17883f5fb1..064098ed35 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -458,9 +458,6 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, code = metaRefMgtAdd(pMeta->vgId, pRid); TSDB_CHECK_CODE(code, lino, _err); - code = createMetaHbInfo(pRid, &pMeta->pHbInfo); - TSDB_CHECK_CODE(code, lino, _err); - code = bkdMgtCreate(tpath, (SBkdMgt**)&pMeta->bkdChkptMgt); TSDB_CHECK_CODE(code, lino, _err); @@ -469,6 +466,9 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, // add refId at the end of initialization function pMeta->rid = taosAddRef(streamMetaId, pMeta); + code = createMetaHbInfo(pRid, &pMeta->pHbInfo); + + TSDB_CHECK_CODE(code, lino, _err); *p = pMeta; return code;