diff options
| author | chrislusf <chris.lu@gmail.com> | 2015-07-11 12:20:09 -0700 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2015-07-11 12:20:09 -0700 |
| commit | 9b8f8f4bb9f71c349b84333dcb4e222f1a5b95c3 (patch) | |
| tree | 89ce62666149d09d391f92425fce3dc96c2e082e | |
| parent | d8bb3845ae45a60344fbe647b76f97b0642f783b (diff) | |
| download | seaweedfs-9b8f8f4bb9f71c349b84333dcb4e222f1a5b95c3.tar.xz seaweedfs-9b8f8f4bb9f71c349b84333dcb4e222f1a5b95c3.zip | |
add logging
| -rw-r--r-- | go/storage/volume_vacuum.go | 1 | ||||
| -rw-r--r-- | go/topology/topology_vacuum.go | 3 | ||||
| -rw-r--r-- | go/weed/weed_server/master_server_handlers_admin.go | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/go/storage/volume_vacuum.go b/go/storage/volume_vacuum.go index 11dc30c4e..7377afdc9 100644 --- a/go/storage/volume_vacuum.go +++ b/go/storage/volume_vacuum.go @@ -38,6 +38,7 @@ func (v *Volume) commitCompact() error { } //glog.V(3).Infof("Pretending to be vacuuming...") //time.Sleep(20 * time.Second) + glog.V(3).Infof("Loading Commit file...") if e = v.load(true, false, v.needleMapKind); e != nil { return e } diff --git a/go/topology/topology_vacuum.go b/go/topology/topology_vacuum.go index 6d7355e38..48bc8311d 100644 --- a/go/topology/topology_vacuum.go +++ b/go/topology/topology_vacuum.go @@ -80,12 +80,15 @@ func batchVacuumVolumeCommit(vl *VolumeLayout, vid storage.VolumeId, locationlis return isCommitSuccess } func (t *Topology) Vacuum(garbageThreshold string) int { + glog.V(0).Infoln("Start vacuum on demand") for _, col := range t.collectionMap.Items { c := col.(*Collection) + glog.V(0).Infoln("vacuum on collection:", c.Name) for _, vl := range c.storageType2VolumeLayout.Items { if vl != nil { volumeLayout := vl.(*VolumeLayout) for vid, locationlist := range volumeLayout.vid2location { + glog.V(0).Infoln("vacuum on collection:", c.Name, "volume", vid) if batchVacuumVolumeCheck(volumeLayout, vid, locationlist, garbageThreshold) { if batchVacuumVolumeCompact(volumeLayout, vid, locationlist) { batchVacuumVolumeCommit(volumeLayout, vid, locationlist) diff --git a/go/weed/weed_server/master_server_handlers_admin.go b/go/weed/weed_server/master_server_handlers_admin.go index 8530e71dd..fb2b18983 100644 --- a/go/weed/weed_server/master_server_handlers_admin.go +++ b/go/weed/weed_server/master_server_handlers_admin.go @@ -77,7 +77,7 @@ func (ms *MasterServer) volumeVacuumHandler(w http.ResponseWriter, r *http.Reque if gcThreshold == "" { gcThreshold = ms.garbageThreshold } - debug("garbageThreshold =", gcThreshold) + glog.Infoln("garbageThreshold =", gcThreshold) ms.Topo.Vacuum(gcThreshold) ms.dirStatusHandler(w, r) } |
