mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
remove uncessary code
This commit is contained in:
parent
b9256e0b34
commit
91285bb51d
|
@ -4,7 +4,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/syndtr/goleveldb/leveldb/errors"
|
"github.com/syndtr/goleveldb/leveldb/errors"
|
||||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||||
|
@ -153,13 +152,14 @@ func getMileStone(db *leveldb.DB) uint64 {
|
||||||
data, err := db.Get(mskBytes, nil)
|
data, err := db.Get(mskBytes, nil)
|
||||||
if err != nil || len(data) != 8 {
|
if err != nil || len(data) != 8 {
|
||||||
glog.Warningf("get milestone from db error: %v, %d", err, len(data))
|
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 !strings.Contains(strings.ToLower(err.Error()), "not found") {
|
||||||
if err != nil {
|
err = setMileStone(db, 0)
|
||||||
glog.Errorf("failed to set milestone: %v", err)
|
if err != nil {
|
||||||
|
glog.Errorf("failed to set milestone: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return util.BytesToUint64(data)
|
return util.BytesToUint64(data)
|
||||||
|
|
Loading…
Reference in a new issue