aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-10-18 20:47:30 -0700
committerChris Lu <chris.lu@gmail.com>2018-10-18 20:47:30 -0700
commit496a7398d13b6f368c2321d0ce8f400e8b6ed1a0 (patch)
treee0b4ff7861caa9c66d7f98301d20f4cfa7c10220
parent037b2b0135bf42816b0c7bd84db4ea135528081e (diff)
downloadseaweedfs-496a7398d13b6f368c2321d0ce8f400e8b6ed1a0.tar.xz
seaweedfs-496a7398d13b6f368c2321d0ce8f400e8b6ed1a0.zip
adjust logging
-rw-r--r--weed/storage/volume_vacuum.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go
index fbe368d38..88df76251 100644
--- a/weed/storage/volume_vacuum.go
+++ b/weed/storage/volume_vacuum.go
@@ -18,7 +18,7 @@ func (v *Volume) garbageLevel() float64 {
}
func (v *Volume) Compact(preallocate int64) error {
- glog.V(3).Infof("Compacting ...")
+ glog.V(3).Infof("Compacting volume %d ...", v.Id)
//no need to lock for copy on write
//v.accessLock.Lock()
//defer v.accessLock.Unlock()
@@ -32,23 +32,23 @@ func (v *Volume) Compact(preallocate int64) error {
}
func (v *Volume) Compact2() error {
- glog.V(3).Infof("Compact2 ...")
+ glog.V(3).Infof("Compact2 volume %d ...", v.Id)
filePath := v.FileName()
glog.V(3).Infof("creating copies for volume %d ...", v.Id)
return v.copyDataBasedOnIndexFile(filePath+".cpd", filePath+".cpx")
}
func (v *Volume) commitCompact() error {
- glog.V(0).Infof("Committing vacuuming...")
+ glog.V(0).Infof("Committing volume %d vacuuming...", v.Id)
v.dataFileAccessLock.Lock()
defer v.dataFileAccessLock.Unlock()
- glog.V(3).Infof("Got Committing lock...")
+ glog.V(3).Infof("Got volume %d committing lock...", v.Id)
v.nm.Close()
_ = v.dataFile.Close()
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 failed %v", 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
@@ -73,7 +73,7 @@ func (v *Volume) commitCompact() error {
os.RemoveAll(v.FileName() + ".ldb")
os.RemoveAll(v.FileName() + ".bdb")
- glog.V(3).Infof("Loading Commit file...")
+ glog.V(3).Infof("Loading volume %d commit file...", v.Id)
if e = v.load(true, false, v.needleMapKind, 0); e != nil {
return e
}
@@ -81,7 +81,7 @@ func (v *Volume) commitCompact() error {
}
func (v *Volume) cleanupCompact() error {
- glog.V(0).Infof("Cleaning up vacuuming...")
+ glog.V(0).Infof("Cleaning up volume %d vacuuming...", v.Id)
e1 := os.Remove(v.FileName() + ".cpd")
e2 := os.Remove(v.FileName() + ".cpx")