Browse Source

avoid possible racing issue if leveldb or boltdb is used.

remove the to-be-generated files during commit

fix https://github.com/chrislusf/seaweedfs/issues/738
pull/747/head
Chris Lu 6 years ago
parent
commit
a362261972
  1. 4
      weed/storage/volume_vacuum.go

4
weed/storage/volume_vacuum.go

@ -69,6 +69,10 @@ func (v *Volume) commitCompact() error {
//glog.V(3).Infof("Pretending to be vacuuming...")
//time.Sleep(20 * time.Second)
os.RemoveAll(v.FileName() + ".ldb")
os.RemoveAll(v.FileName() + ".bdb")
glog.V(3).Infof("Loading Commit file...")
if e = v.load(true, false, v.needleMapKind, 0); e != nil {
return e

Loading…
Cancel
Save