mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-02-09 09:17:28 +08:00
@@ -64,6 +64,10 @@ func (nm *NeedleMap) Delete(key NeedleId, offset Offset) error {
|
|||||||
return nm.appendToIndexFile(key, offset, TombstoneFileSize)
|
return nm.appendToIndexFile(key, offset, TombstoneFileSize)
|
||||||
}
|
}
|
||||||
func (nm *NeedleMap) Close() {
|
func (nm *NeedleMap) Close() {
|
||||||
|
indexFileName := nm.indexFile.Name()
|
||||||
|
if err := nm.indexFile.Sync(); err != nil {
|
||||||
|
glog.Warningf("sync file %s failed, %v", indexFileName, err)
|
||||||
|
}
|
||||||
_ = nm.indexFile.Close()
|
_ = nm.indexFile.Close()
|
||||||
}
|
}
|
||||||
func (nm *NeedleMap) Destroy() error {
|
func (nm *NeedleMap) Destroy() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user