fix: revert the code change
This commit is contained in:
parent
aabdb1e27b
commit
3ee376c2c0
|
@ -16,19 +16,9 @@
|
||||||
#include "tsdb.h"
|
#include "tsdb.h"
|
||||||
|
|
||||||
static bool tsdbShouldDoRetention(STsdb *pTsdb, int64_t now) {
|
static bool tsdbShouldDoRetention(STsdb *pTsdb, int64_t now) {
|
||||||
STsdbKeepCfg *keepCfg = &pTsdb->keepCfg;
|
|
||||||
|
|
||||||
if ((keepCfg->keep0 == keepCfg->keep1) && (keepCfg->keep1 == keepCfg->keep2)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tfsGetLevel(pTsdb->pVnode->pTfs) <= 1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int32_t iSet = 0; iSet < taosArrayGetSize(pTsdb->fs.aDFileSet); iSet++) {
|
for (int32_t iSet = 0; iSet < taosArrayGetSize(pTsdb->fs.aDFileSet); iSet++) {
|
||||||
SDFileSet *pSet = (SDFileSet *)taosArrayGet(pTsdb->fs.aDFileSet, iSet);
|
SDFileSet *pSet = (SDFileSet *)taosArrayGet(pTsdb->fs.aDFileSet, iSet);
|
||||||
int32_t expLevel = tsdbFidLevel(pSet->fid, keepCfg, now);
|
int32_t expLevel = tsdbFidLevel(pSet->fid, &pTsdb->keepCfg, now);
|
||||||
SDiskID did;
|
SDiskID did;
|
||||||
|
|
||||||
if (expLevel == pSet->diskId.level) continue;
|
if (expLevel == pSet->diskId.level) continue;
|
||||||
|
|
Loading…
Reference in New Issue