fix race detector found problems
This commit is contained in:
@@ -47,9 +47,7 @@ func LoadBtreeNeedleMap(file *os.File) (*NeedleMap, error) {
|
||||
|
||||
func doLoading(file *os.File, nm *NeedleMap) (*NeedleMap, error) {
|
||||
e := WalkIndexFile(file, func(key NeedleId, offset Offset, size uint32) error {
|
||||
if key > nm.MaximumFileKey {
|
||||
nm.MaximumFileKey = key
|
||||
}
|
||||
nm.MaybeSetMaxFileKey(key)
|
||||
if !offset.IsZero() && size != TombstoneFileSize {
|
||||
nm.FileCounter++
|
||||
nm.FileByteCounter = nm.FileByteCounter + uint64(size)
|
||||
@@ -67,7 +65,7 @@ func doLoading(file *os.File, nm *NeedleMap) (*NeedleMap, error) {
|
||||
}
|
||||
return nil
|
||||
})
|
||||
glog.V(1).Infof("max file key: %d for file: %s", nm.MaximumFileKey, file.Name())
|
||||
glog.V(1).Infof("max file key: %d for file: %s", nm.MaxFileKey(), file.Name())
|
||||
return nm, e
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user