mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-30 05:34:02 +08:00
only cares about error other than EOF
This commit is contained in:
parent
91492b4947
commit
a4cef2fbd4
@ -3,6 +3,7 @@ package storage
|
|||||||
import (
|
import (
|
||||||
"code.google.com/p/weed-fs/go/util"
|
"code.google.com/p/weed-fs/go/util"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -60,7 +61,10 @@ func LoadNeedleMap(file *os.File) (*NeedleMap, error) {
|
|||||||
|
|
||||||
count, e = nm.indexFile.Read(bytes)
|
count, e = nm.indexFile.Read(bytes)
|
||||||
}
|
}
|
||||||
return nm, nil
|
if e == io.EOF {
|
||||||
|
e = nil
|
||||||
|
}
|
||||||
|
return nm, e
|
||||||
}
|
}
|
||||||
|
|
||||||
func (nm *NeedleMap) Put(key uint64, offset uint32, size uint32) (int, error) {
|
func (nm *NeedleMap) Put(key uint64, offset uint32, size uint32) (int, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user