Merge pull request #25503 from taosdata/fix/TS-4718

fix:[TS-4718]pMsg->data is null
This commit is contained in:
dapan1121 2024-04-29 14:26:42 +08:00 committed by GitHub
commit 511e0de155
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1356,6 +1356,11 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
goto END; goto END;
} }
if(pMsg->pData == NULL){
tscError("consumer:0x%" PRIx64 " msg discard from vgId:%d, since msg is NULL", tmq->consumerId, vgId);
goto FAIL;
}
int32_t msgEpoch = ((SMqRspHead*)pMsg->pData)->epoch; int32_t msgEpoch = ((SMqRspHead*)pMsg->pData)->epoch;
int32_t clientEpoch = atomic_load_32(&tmq->epoch); int32_t clientEpoch = atomic_load_32(&tmq->epoch);
if (msgEpoch < clientEpoch) { if (msgEpoch < clientEpoch) {