From 9b3844ea91b7f744d0d8caac1fb320575e6f9e0e Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 7 May 2020 14:29:06 +0800 Subject: [PATCH] a dead lock while tsdb commit --- src/tsdb/src/tsdbFile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tsdb/src/tsdbFile.c b/src/tsdb/src/tsdbFile.c index 0c1b9e314e..b1228b0230 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -180,7 +180,7 @@ void tsdbFitRetention(STsdbRepo *pRepo) { int mfid = tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision); - while (pGroup[0].fileId < mfid) { + while (pFileH->numOfFGroups > 0 && pGroup[0].fileId < mfid) { tsdbRemoveFileGroup(pFileH, pGroup[0].fileId); } } -- GitLab