diff --git a/include/libs/wal/wal.h b/include/libs/wal/wal.h index 47230bc95c..a4c1e6a648 100644 --- a/include/libs/wal/wal.h +++ b/include/libs/wal/wal.h @@ -214,7 +214,7 @@ int32_t walSkipFetchBody(SWalReader *pRead, const SWalCkHead *pHead); void walRefFirstVer(SWal *, SWalRef *); void walRefLastVer(SWal *, SWalRef *); -void walRefCommitVer(SWal *, SWalRef *); +//void walRefCommitVer(SWal *, SWalRef *); SWalRef *walOpenRef(SWal *); void walCloseRef(SWal *pWal, int64_t refId); diff --git a/source/dnode/mnode/impl/src/mndDef.c b/source/dnode/mnode/impl/src/mndDef.c index 09c4053f93..6b281fca6b 100644 --- a/source/dnode/mnode/impl/src/mndDef.c +++ b/source/dnode/mnode/impl/src/mndDef.c @@ -630,6 +630,8 @@ void *tDecodeSubscribeObj(const void *buf, SMqSubscribeObj *pSub, int8_t sver) { } } buf = taosDecodeString(buf, &pSub->qmsg); + }else{ + pSub->qmsg = taosStrdup(""); } return (void *)buf; } diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c index 3b0e6749c2..900bb94121 100644 --- a/source/dnode/vnode/src/tq/tqMeta.c +++ b/source/dnode/vnode/src/tq/tqMeta.c @@ -379,7 +379,7 @@ int32_t tqCreateHandle(STQ* pTq, SMqRebVgReq* req, STqHandle* handle){ handle->execHandle.execTb.qmsg = taosStrdup(req->qmsg); } - handle->snapshotVer = walGetLastVer(pTq->pVnode->pWal); + handle->snapshotVer = walGetCommittedVer(pTq->pVnode->pWal); if(buildHandle(pTq, handle) < 0){ return -1; diff --git a/source/libs/wal/src/walRef.c b/source/libs/wal/src/walRef.c index 2f1bcfee83..fd1d51a4f1 100644 --- a/source/libs/wal/src/walRef.c +++ b/source/libs/wal/src/walRef.c @@ -81,11 +81,11 @@ void walRefLastVer(SWal *pWal, SWalRef *pRef) { wDebug("vgId:%d, wal ref version %" PRId64 " for last", pWal->cfg.vgId, ver); } -void walRefCommitVer(SWal *pWal, SWalRef *pRef) { - taosThreadMutexLock(&pWal->mutex); - int64_t ver = walGetCommittedVer(pWal); - pRef->refVer = ver; - - taosThreadMutexUnlock(&pWal->mutex); - wDebug("vgId:%d, wal ref version %" PRId64 " for committed", pWal->cfg.vgId, ver); -} +//void walRefCommitVer(SWal *pWal, SWalRef *pRef) { +// taosThreadMutexLock(&pWal->mutex); +// int64_t ver = walGetCommittedVer(pWal); +// pRef->refVer = ver; +// +// taosThreadMutexUnlock(&pWal->mutex); +// wDebug("vgId:%d, wal ref version %" PRId64 " for committed", pWal->cfg.vgId, ver); +//}