From 6cd8c2313149571e95c79e53cb420b603d02e390 Mon Sep 17 00:00:00 2001 From: xywang Date: Fri, 4 Mar 2022 14:52:11 +0800 Subject: [PATCH] [TS-1233]: fixed coredump when timestamp collection excessed threshold --- src/query/src/qTsbuf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/query/src/qTsbuf.c b/src/query/src/qTsbuf.c index d5364da6d7..bb124dec06 100644 --- a/src/query/src/qTsbuf.c +++ b/src/query/src/qTsbuf.c @@ -492,6 +492,10 @@ void tsBufAppend(STSBuf* pTSBuf, int32_t id, tVariant* tag, const char* pData, i } void tsBufFlush(STSBuf* pTSBuf) { + if (pTSBuf->numOfGroups <= 0) { + return; + } + writeDataToDisk(pTSBuf); shrinkBuffer(&pTSBuf->tsData); -- GitLab