mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 22:57:24 +08:00
WIP
This commit is contained in:
@@ -38,7 +38,7 @@ func (v *Volume) Compact2() error {
|
||||
return v.copyDataBasedOnIndexFile(filePath+".cpd", filePath+".cpx")
|
||||
}
|
||||
|
||||
func (v *Volume) commitCompact() error {
|
||||
func (v *Volume) CommitCompact() error {
|
||||
glog.V(0).Infof("Committing volume %d vacuuming...", v.Id)
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
@@ -53,7 +53,7 @@ func (v *Volume) commitCompact() error {
|
||||
|
||||
var e error
|
||||
if e = v.makeupDiff(v.FileName()+".cpd", v.FileName()+".cpx", v.FileName()+".dat", v.FileName()+".idx"); e != nil {
|
||||
glog.V(0).Infof("makeupDiff in commitCompact volume %d failed %v", v.Id, e)
|
||||
glog.V(0).Infof("makeupDiff in CommitCompact volume %d failed %v", v.Id, e)
|
||||
e = os.Remove(v.FileName() + ".cpd")
|
||||
if e != nil {
|
||||
return e
|
||||
|
Reference in New Issue
Block a user