printout error

This commit is contained in:
Chris Lu 2020-04-27 12:41:31 -07:00
parent 725e47dcc3
commit 6190fd665d

View file

@ -80,10 +80,10 @@ func (v *Volume) Compact2(preallocate int64, compactionBytePerSecond int64) erro
v.lastCompactRevision = v.SuperBlock.CompactionRevision v.lastCompactRevision = v.SuperBlock.CompactionRevision
glog.V(3).Infof("creating copies for volume %d ...", v.Id) glog.V(3).Infof("creating copies for volume %d ...", v.Id)
if err := v.DataBackend.Sync(); err != nil { if err := v.DataBackend.Sync(); err != nil {
glog.V(0).Infof("compact2 fail to sync volume dat %d", v.Id) glog.V(0).Infof("compact2 fail to sync volume dat %d: %v", v.Id, err)
} }
if err := v.nm.Sync(); err != nil { if err := v.nm.Sync(); err != nil {
glog.V(0).Infof("compact2 fail to sync volume idx %d", v.Id) glog.V(0).Infof("compact2 fail to sync volume idx %d: %v", v.Id, err)
} }
return copyDataBasedOnIndexFile(filePath+".dat", filePath+".idx", filePath+".cpd", filePath+".cpx", v.SuperBlock, v.Version(), preallocate, compactionBytePerSecond) return copyDataBasedOnIndexFile(filePath+".dat", filePath+".idx", filePath+".cpd", filePath+".cpx", v.SuperBlock, v.Version(), preallocate, compactionBytePerSecond)
} }