diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 925f8feb05..58085e2cc2 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -685,13 +685,13 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg tqInfo("vgId:%d switch consumer from Id:0x%" PRIx64 " to Id:0x%" PRIx64, req.vgId, pHandle->consumerId, req.newConsumerId); tqUnregisterPushHandle(pTq, pHandle); - taosHashRemove(pTq->pHandle, pHandle->subKey, strlen(pHandle->subKey)); // update handle to avoid req->qmsg changed if spilt vnode is failed STqHandle handle = {0}; ret = tqCreateHandle(pTq, &req, &handle, pHandle->snapshotVer); if (ret < 0) { tqDestroyTqHandle(&handle); + taosWUnLockLatch(&pTq->lock); goto end; } ret = tqMetaSaveHandle(pTq, req.subKey, &handle);