fix(stream): add null check.

This commit is contained in:
Haojun Liao 2023-10-03 02:39:57 +08:00
parent 58f410a9df
commit 38aff641ee
1 changed files with 5 additions and 2 deletions

View File

@ -892,8 +892,11 @@ void metaHbToMnode(void* param, void* tmrId) {
entry.inputRate = entry.inputQUsed*100.0/STREAM_TASK_INPUT_QUEUE_CAPACITY_IN_SIZE;
entry.outputRate = entry.outputQUsed*100.0/STREAM_TASK_OUTPUT_QUEUE_CAPACITY_IN_SIZE;
entry.offset = walReaderGetCurrentVer((*pTask)->exec.pWalReader);
walReaderValidVersionRange((*pTask)->exec.pWalReader, &entry.verStart, &entry.verEnd);
if ((*pTask)->exec.pWalReader != NULL) {
entry.offset = walReaderGetCurrentVer((*pTask)->exec.pWalReader);
walReaderValidVersionRange((*pTask)->exec.pWalReader, &entry.verStart, &entry.verEnd);
}
taosArrayPush(hbMsg.pTaskStatus, &entry);