refactor: update the logs.
This commit is contained in:
parent
4f15a32839
commit
8a8f1daabd
|
@ -271,7 +271,7 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {
|
||||||
SReqResultInfo *pResultInfo;
|
SReqResultInfo *pResultInfo;
|
||||||
if (msg->resIter == -1) {
|
if (msg->resIter == -1) {
|
||||||
pResultInfo = tmqGetNextResInfo(res, true);
|
pResultInfo = tmqGetNextResInfo(res, true);
|
||||||
tscDebug("consumer:0x%" PRIx64 ", vgId:%d, numOfRows:%" PRId64 ", total rows:%" PRId64, msg->rsp.head.consumerId,
|
tscDebug("consumer:0x%" PRIx64 " vgId:%d, numOfRows:%" PRId64 ", total rows:%" PRId64, msg->rsp.head.consumerId,
|
||||||
msg->vgId, pResultInfo->numOfRows, pResultInfo->totalRows);
|
msg->vgId, pResultInfo->numOfRows, pResultInfo->totalRows);
|
||||||
} else {
|
} else {
|
||||||
pResultInfo = tmqGetCurResInfo(res);
|
pResultInfo = tmqGetCurResInfo(res);
|
||||||
|
|
|
@ -1335,10 +1335,10 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
tDecoderClear(&decoder);
|
tDecoderClear(&decoder);
|
||||||
memcpy(&pRspWrapper->dataRsp, pMsg->pData, sizeof(SMqRspHead));
|
memcpy(&pRspWrapper->dataRsp, pMsg->pData, sizeof(SMqRspHead));
|
||||||
|
|
||||||
tscDebug("consumer:0x%" PRIx64 " recv poll rsp, vgId:%d, req:%" PRId64 ", rsp:%" PRId64
|
char buf[80];
|
||||||
" type %d, reqId:0x%" PRIx64,
|
tFormatOffset(buf, 80, &pRspWrapper->dataRsp.rspOffset);
|
||||||
tmq->consumerId, vgId, pRspWrapper->dataRsp.reqOffset.version, pRspWrapper->dataRsp.rspOffset.version, rspType, requestId);
|
tscDebug("consumer:0x%" PRIx64 " recv poll rsp, vgId:%d, req:%" PRId64 ", rsp:%s type %d, reqId:0x%" PRIx64,
|
||||||
|
tmq->consumerId, vgId, pRspWrapper->dataRsp.reqOffset.version, buf, rspType, requestId);
|
||||||
} else if (rspType == TMQ_MSG_TYPE__POLL_META_RSP) {
|
} else if (rspType == TMQ_MSG_TYPE__POLL_META_RSP) {
|
||||||
SDecoder decoder;
|
SDecoder decoder;
|
||||||
tDecoderInit(&decoder, POINTER_SHIFT(pMsg->pData, sizeof(SMqRspHead)), pMsg->len - sizeof(SMqRspHead));
|
tDecoderInit(&decoder, POINTER_SHIFT(pMsg->pData, sizeof(SMqRspHead)), pMsg->len - sizeof(SMqRspHead));
|
||||||
|
@ -1996,6 +1996,8 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tmq_consumer_close(tmq_t* tmq) {
|
int32_t tmq_consumer_close(tmq_t* tmq) {
|
||||||
|
tscDebug("consumer:0x%" PRIx64" start to close consumer, status:%d", tmq->consumerId, tmq->status);
|
||||||
|
|
||||||
if (tmq->status == TMQ_CONSUMER_STATUS__READY) {
|
if (tmq->status == TMQ_CONSUMER_STATUS__READY) {
|
||||||
int32_t rsp = tmq_commit_sync(tmq, NULL);
|
int32_t rsp = tmq_commit_sync(tmq, NULL);
|
||||||
if (rsp != 0) {
|
if (rsp != 0) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ class TDTestCase:
|
||||||
def init(self, conn, logSql, replicaVar=1):
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
self.replicaVar = int(replicaVar)
|
self.replicaVar = int(replicaVar)
|
||||||
tdLog.debug("start to execute %s" % __file__)
|
tdLog.debug("start to execute %s" % __file__)
|
||||||
tdSql.init(conn.cursor())
|
tdSql.init(conn.cursor(), True)
|
||||||
self.setsql = TDSetSql()
|
self.setsql = TDSetSql()
|
||||||
self.column_dict = {
|
self.column_dict = {
|
||||||
'ts': 'timestamp',
|
'ts': 'timestamp',
|
||||||
|
|
Loading…
Reference in New Issue