From 91285bb51d3b95befb5aba0104f6ac83e5b07572 Mon Sep 17 00:00:00 2001 From: guol-fnst Date: Tue, 19 Jul 2022 20:00:44 +0800 Subject: [PATCH] remove uncessary code --- weed/storage/needle_map_leveldb.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/weed/storage/needle_map_leveldb.go b/weed/storage/needle_map_leveldb.go index c26856ba3..f41524a97 100644 --- a/weed/storage/needle_map_leveldb.go +++ b/weed/storage/needle_map_leveldb.go @@ -4,7 +4,6 @@ import ( "fmt" "os" "path/filepath" - "strings" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/opt" @@ -153,13 +152,14 @@ func getMileStone(db *leveldb.DB) uint64 { data, err := db.Get(mskBytes, nil) if err != nil || len(data) != 8 { glog.Warningf("get milestone from db error: %v, %d", err, len(data)) - if !strings.Contains(strings.ToLower(err.Error()), "not found") { - err = setMileStone(db, 0) - if err != nil { - glog.Errorf("failed to set milestone: %v", err) + /* + if !strings.Contains(strings.ToLower(err.Error()), "not found") { + err = setMileStone(db, 0) + if err != nil { + glog.Errorf("failed to set milestone: %v", err) + } } - } - + */ return 0 } return util.BytesToUint64(data)