From 7c277f05e18be29c30f07fefc6164c792ba852c5 Mon Sep 17 00:00:00 2001 From: xywang Date: Fri, 4 Mar 2022 19:15:13 +0800 Subject: [PATCH] [TS-1233]: fixed coredump when timestamp collection excessed threshold --- src/query/src/qTsbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/query/src/qTsbuf.c b/src/query/src/qTsbuf.c index 9893533a58..65a0020283 100644 --- a/src/query/src/qTsbuf.c +++ b/src/query/src/qTsbuf.c @@ -490,10 +490,10 @@ void tsBufAppend(STSBuf* pTSBuf, int32_t id, tVariant* tag, const char* pData, i } void tsBufFlush(STSBuf* pTSBuf) { - if (pTSBuf->tsData.len <= 0) { + if (pTSBuf->numOfGroups <= 0) { return; } - + writeDataToDisk(pTSBuf); shrinkBuffer(&pTSBuf->tsData); -- GitLab