mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
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:
parent
4df3552f74
commit
ab88dd77e7
@ -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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user