fix:[TS-5679] auto commit error

This commit is contained in:
wangmm0220 2024-11-24 23:39:48 +08:00
parent e11adb498b
commit dcd664c2cb
1 changed files with 8 additions and 4 deletions

View File

@ -1872,13 +1872,17 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) {
if (tmq->epTimer == NULL){
tmq->epTimer = taosTmrStart(tmqAssignAskEpTask, DEFAULT_ASKEP_INTERVAL, (void*)(tmq->refId), tmqMgmt.timer);
if (tmq->epTimer == NULL) {
code = TSDB_CODE_TSC_INTERNAL_ERROR;
goto END;
}
}
if (tmq->autoCommit && tmq->commitTimer == NULL){
tmq->commitTimer = taosTmrStart(tmqAssignDelayedCommitTask, tmq->autoCommitInterval, (void*)(tmq->refId), tmqMgmt.timer);
}
if (tmq->epTimer == NULL || tmq->commitTimer == NULL) {
code = TSDB_CODE_TSC_INTERNAL_ERROR;
goto END;
if (tmq->commitTimer == NULL) {
code = TSDB_CODE_TSC_INTERNAL_ERROR;
goto END;
}
}
END: