fix:[TD-30883]send hb before close in tmq
This commit is contained in:
parent
7ff7ef1d73
commit
2176fa3b1a
|
@ -100,6 +100,7 @@ struct tmq_t {
|
||||||
int64_t totalRows;
|
int64_t totalRows;
|
||||||
|
|
||||||
// timer
|
// timer
|
||||||
|
tmr_h hbLiveTimer;
|
||||||
tmr_h epTimer;
|
tmr_h epTimer;
|
||||||
tmr_h commitTimer;
|
tmr_h commitTimer;
|
||||||
STscObj* pTscObj; // connection
|
STscObj* pTscObj; // connection
|
||||||
|
@ -878,7 +879,7 @@ void tmqSendHbReq(void* param, void* tmrId) {
|
||||||
OVER:
|
OVER:
|
||||||
tDestroySMqHbReq(&req);
|
tDestroySMqHbReq(&req);
|
||||||
if(tmrId != NULL){
|
if(tmrId != NULL){
|
||||||
taosTmrReset(tmqSendHbReq, DEFAULT_HEARTBEAT_INTERVAL, param, tmqMgmt.timer, &tmrId);
|
taosTmrReset(tmqSendHbReq, DEFAULT_HEARTBEAT_INTERVAL, param, tmqMgmt.timer, &tmq->hbLiveTimer);
|
||||||
}
|
}
|
||||||
taosReleaseRef(tmqMgmt.rsetId, refId);
|
taosReleaseRef(tmqMgmt.rsetId, refId);
|
||||||
}
|
}
|
||||||
|
@ -1163,7 +1164,7 @@ tmq_t* tmq_consumer_new(tmq_conf_t* conf, char* errstr, int32_t errstrLen) {
|
||||||
goto _failed;
|
goto _failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
taosTmrStart(tmqSendHbReq, DEFAULT_HEARTBEAT_INTERVAL, (void*)pTmq->refId, tmqMgmt.timer);
|
pTmq->hbLiveTimer = taosTmrStart(tmqSendHbReq, DEFAULT_HEARTBEAT_INTERVAL, (void*)pTmq->refId, tmqMgmt.timer);
|
||||||
|
|
||||||
char buf[TSDB_OFFSET_LEN] = {0};
|
char buf[TSDB_OFFSET_LEN] = {0};
|
||||||
STqOffsetVal offset = {.type = pTmq->resetOffsetCfg};
|
STqOffsetVal offset = {.type = pTmq->resetOffsetCfg};
|
||||||
|
|
Loading…
Reference in New Issue