From 4c87857153f1b705d07ad91733ddce63387df7e8 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 25 Apr 2024 19:49:01 +0800 Subject: [PATCH 1/2] fix:[TS-4718]pMsg->data is null --- source/client/src/clientTmq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 8eabbb8098..18a6f2d4c6 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1352,6 +1352,11 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { goto FAIL; } + if(pMsg->pData == NULL){ + tscError("consumer:0x%" PRIx64 " msg discard from vgId:%d, since msg is NULL", tmq->consumerId, vgId); + goto FAIL; + } + if (code != 0) { goto END; } From 07291a7ebca8544ab6a8ed605c2f80004cbc5964 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 29 Apr 2024 01:19:53 +0800 Subject: [PATCH 2/2] fix:[TS-4718]pMsg->data is null --- source/client/src/clientTmq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 18a6f2d4c6..2a94c7a9c0 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1352,15 +1352,15 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { goto FAIL; } + if (code != 0) { + goto END; + } + if(pMsg->pData == NULL){ tscError("consumer:0x%" PRIx64 " msg discard from vgId:%d, since msg is NULL", tmq->consumerId, vgId); goto FAIL; } - if (code != 0) { - goto END; - } - int32_t msgEpoch = ((SMqRspHead*)pMsg->pData)->epoch; int32_t clientEpoch = atomic_load_32(&tmq->epoch); if (msgEpoch < clientEpoch) {