diff options
| author | bingoohuang <bingoo.huang@gmail.com> | 2019-01-17 09:17:19 +0800 |
|---|---|---|
| committer | bingoohuang <bingoo.huang@gmail.com> | 2019-01-17 09:17:19 +0800 |
| commit | ab6be025d76748388ad3eea6fe6ca000db1c2435 (patch) | |
| tree | 1be9b1b5e7f91693f4cabe3ae0d114cb7f7dced6 /weed/topology/topology_vacuum.go | |
| parent | 6ddfaf33cba953b92a5e3383a15bf26ab1845dbc (diff) | |
| download | seaweedfs-ab6be025d76748388ad3eea6fe6ca000db1c2435.tar.xz seaweedfs-ab6be025d76748388ad3eea6fe6ca000db1c2435.zip | |
go fmt and fix some typo
Diffstat (limited to 'weed/topology/topology_vacuum.go')
| -rw-r--r-- | weed/topology/topology_vacuum.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/weed/topology/topology_vacuum.go b/weed/topology/topology_vacuum.go index 9b7f295d4..d6b09314b 100644 --- a/weed/topology/topology_vacuum.go +++ b/weed/topology/topology_vacuum.go @@ -136,12 +136,12 @@ func vacuumOneVolumeLayout(volumeLayout *VolumeLayout, c *Collection, garbageThr volumeLayout.accessLock.RLock() tmpMap := make(map[storage.VolumeId]*VolumeLocationList) - for vid, locationlist := range volumeLayout.vid2location { - tmpMap[vid] = locationlist + for vid, locationList := range volumeLayout.vid2location { + tmpMap[vid] = locationList } volumeLayout.accessLock.RUnlock() - for vid, locationlist := range tmpMap { + for vid, locationList := range tmpMap { volumeLayout.accessLock.RLock() isReadOnly, hasValue := volumeLayout.readonlyVolumes[vid] @@ -152,11 +152,11 @@ func vacuumOneVolumeLayout(volumeLayout *VolumeLayout, c *Collection, garbageThr } glog.V(2).Infof("check vacuum on collection:%s volume:%d", c.Name, vid) - if batchVacuumVolumeCheck(volumeLayout, vid, locationlist, garbageThreshold) { - if batchVacuumVolumeCompact(volumeLayout, vid, locationlist, preallocate) { - batchVacuumVolumeCommit(volumeLayout, vid, locationlist) + if batchVacuumVolumeCheck(volumeLayout, vid, locationList, garbageThreshold) { + if batchVacuumVolumeCompact(volumeLayout, vid, locationList, preallocate) { + batchVacuumVolumeCommit(volumeLayout, vid, locationList) } else { - batchVacuumVolumeCleanup(volumeLayout, vid, locationlist) + batchVacuumVolumeCleanup(volumeLayout, vid, locationList) } } } |
