fix(tmq): use before remove hash item.

This commit is contained in:
Haojun Liao 2023-03-10 10:31:53 +08:00
parent b31b7c3f64
commit 0d1b2e4b5a
1 changed files with 2 additions and 2 deletions

View File

@ -383,11 +383,11 @@ int32_t tqRemovePushEntry(STQ* pTq, const char* pKey, int32_t keyLen, uint64_t c
tqDebug("tmq poll: consumer:0x%" PRIx64 ", subkey %s vgId:%d remove from push mgr, remains:%d", consumerId,
(*pEntry)->subKey, vgId, taosHashGetSize(pTq->pPushMgr) - 1);
taosHashRemove(pTq->pPushMgr, pKey, keyLen);
if (rspConsumer) { // rsp the old consumer with empty block.
tqPushDataRsp(pTq, *pEntry);
}
taosHashRemove(pTq->pPushMgr, pKey, keyLen);
}
return 0;