From 6967d2640b8a15dd8ded92592c89e70a0baccfee Mon Sep 17 00:00:00 2001 From: hzcheng Date: Thu, 7 May 2020 14:49:45 +0800 Subject: [PATCH] fix retention error --- 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 b1228b0230..ad98bb7b20 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -178,7 +178,7 @@ void tsdbFitRetention(STsdbRepo *pRepo) { SFileGroup *pGroup = pFileH->fGroup; int mfid = - tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision); + tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision) - pFileH->maxFGroups + 3; while (pFileH->numOfFGroups > 0 && pGroup[0].fileId < mfid) { tsdbRemoveFileGroup(pFileH, pGroup[0].fileId); -- GitLab