From 9b6edbe7e75814325c8482cb3264677cdc383ff4 Mon Sep 17 00:00:00 2001 From: lichuang Date: Tue, 22 Jun 2021 21:03:31 +0800 Subject: [PATCH] [TD-4352]fix compile error --- src/tsdb/src/tsdbCommit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tsdb/src/tsdbCommit.c b/src/tsdb/src/tsdbCommit.c index 68d0fb9ae1..bb08c159b8 100644 --- a/src/tsdb/src/tsdbCommit.c +++ b/src/tsdb/src/tsdbCommit.c @@ -453,8 +453,8 @@ static int tsdbDropMetaRecord(STsdbFS *pfs, SMFile *pMFile, uint64_t uid) { } static int tsdbCompactMetaFile(STsdbRepo *pRepo, STsdbFS *pfs, SMFile *pMFile) { - float delPercent = pMFile->info.nDels * 1.0 / pMFile->info.nRecords; - float tombPercent = pMFile->info.tombSize * 1.0 / pMFile->info.size; + float delPercent = (float)(pMFile->info.nDels) / (float)(pMFile->info.nRecords); + float tombPercent = (float)(pMFile->info.tombSize) / (float)(pMFile->info.size); if (delPercent < 0.33 && tombPercent < 0.33) { return 0; @@ -540,6 +540,7 @@ _err: ASSERT(mf.info.nDels == 0); ASSERT(mf.info.tombSize == 0); + tsdbInfo("end compact tsdb meta file,code:%d,nRecords:%" PRId64 ",size:%" PRId64, code,mf.info.nRecords,mf.info.size); return code;