close current needle map when switching

This commit is contained in:
Chris Lu 2016-05-09 10:04:21 -07:00
parent 3626ec5cf7
commit 766512c475

View file

@ -28,6 +28,7 @@ func (v *Volume) commitCompact() error {
v.dataFileAccessLock.Lock()
defer v.dataFileAccessLock.Unlock()
glog.V(3).Infof("Got Committing lock...")
v.nm.Close()
_ = v.dataFile.Close()
var e error
if e = os.Rename(v.FileName()+".cpd", v.FileName()+".dat"); e != nil {