From 4d635478fea25359ad812b8282bd747809a125d5 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 7 Jan 2022 18:59:17 +0800 Subject: [PATCH] fix --- source/client/src/clientHb.c | 3 ++- source/common/src/tmsg.c | 2 +- source/libs/wal/src/walWrite.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 8672b52343..1d50f7574a 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -96,8 +96,9 @@ static void* hbThreadFunc(void* param) { SClientHbBatchReq* pReq = hbGatherAllInfo(); void* reqStr = NULL; - tSerializeSClientHbBatchReq(&reqStr, pReq); + int tlen = tSerializeSClientHbBatchReq(&reqStr, pReq); SMsgSendInfo info; + /*info.fp = hbHandleRsp;*/ int64_t transporterId = 0; asyncSendMsgToServer(clientHbMgr.transporter, &clientHbMgr.epSet, &transporterId, &info); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 408ce899b1..09523da965 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -37,7 +37,7 @@ int tSerializeSClientHbReq(void **buf, const SClientHbReq *pReq) { taosHashGetKey(pIter, &kv.key, (size_t *)&kv.keyLen); kv.valueLen = taosHashGetDataLen(pIter); kv.value = pIter; - taosEncodeSKv(buf, &kv); + tlen += taosEncodeSKv(buf, &kv); pIter = taosHashIterate(pReq->info, pIter); } diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c index 39bf06cedd..5eda16b061 100644 --- a/source/libs/wal/src/walWrite.c +++ b/source/libs/wal/src/walWrite.c @@ -244,6 +244,7 @@ int walRoll(SWal *pWal) { pWal->writeIdxTfd = idxTfd; pWal->writeLogTfd = logTfd; pWal->writeCur = taosArrayGetSize(pWal->fileInfoSet) - 1; + ASSERT(pWal->writeCur >= 0); pWal->lastRollSeq = walGetSeq(); return 0;