Merge pull request #21427 from taosdata/mark/tmq

fix:lost data because tsdbreader or task is killed
This commit is contained in:
Hui Li 2023-05-23 15:53:11 +08:00 committed by GitHub
commit 09a99142cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -572,16 +572,16 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
// atomic_add_fetch_32(&pHandle->epoch, 1); // atomic_add_fetch_32(&pHandle->epoch, 1);
// kill executing task // kill executing task
if(tqIsHandleExec(pHandle)) { // if(tqIsHandleExec(pHandle)) {
qTaskInfo_t pTaskInfo = pHandle->execHandle.task; // qTaskInfo_t pTaskInfo = pHandle->execHandle.task;
if (pTaskInfo != NULL) { // if (pTaskInfo != NULL) {
qKillTask(pTaskInfo, TSDB_CODE_SUCCESS); // qKillTask(pTaskInfo, TSDB_CODE_SUCCESS);
} // }
// if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { // if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
// qStreamCloseTsdbReader(pTaskInfo); // qStreamCloseTsdbReader(pTaskInfo);
// } // }
} // }
// remove if it has been register in the push manager, and return one empty block to consumer // remove if it has been register in the push manager, and return one empty block to consumer
tqUnregisterPushHandle(pTq, pHandle); tqUnregisterPushHandle(pTq, pHandle);
taosWUnLockLatch(&pTq->lock); taosWUnLockLatch(&pTq->lock);