Remove unnecessary log for datacoord gc (#19698)

Signed-off-by: yun.zhang <yun.zhang@zilliz.com>

Signed-off-by: yun.zhang <yun.zhang@zilliz.com>
This commit is contained in:
jaime 2022-10-13 14:43:23 +08:00 committed by GitHub
parent 4df3552f74
commit ab88dd77e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,24 +149,23 @@ func (gc *garbageCollector) scan() {
segmentID, err := storage.ParseSegmentIDByBinlog(gc.option.cli.RootPath(), infoKey)
if err != nil {
missing++
log.Warn("parse segment id error", zap.String("infoKey", infoKey), zap.Error(err))
continue
}
if gc.segRefer.HasSegmentLock(segmentID) {
valid++
continue
}
missing++
// not found in meta, check last modified time exceeds tolerance duration
if err != nil {
log.Error("get modified time error", zap.String("infoKey", infoKey))
continue
}
if time.Since(modTimes[i]) > gc.option.missingTolerance {
// ignore error since it could be cleaned up next time
removedKeys = append(removedKeys, infoKey)
err = gc.option.cli.Remove(ctx, infoKey)
if err != nil {
missing++
log.Error("failed to remove object", zap.String("infoKey", infoKey), zap.Error(err))
}
}