diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-02-17 20:57:08 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-02-17 20:57:08 -0800 |
| commit | 3575d41009e4367658e75e6ae780c6260b80daf9 (patch) | |
| tree | bc3330e274901d782395b7396cb54d7cc42608b1 /weed/topology | |
| parent | 6daa932f5c1571cc60cf89014cf17810d756dd6b (diff) | |
| download | seaweedfs-3575d41009e4367658e75e6ae780c6260b80daf9.tar.xz seaweedfs-3575d41009e4367658e75e6ae780c6260b80daf9.zip | |
go fmt
Diffstat (limited to 'weed/topology')
| -rw-r--r-- | weed/topology/disk.go | 12 | ||||
| -rw-r--r-- | weed/topology/node.go | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/weed/topology/disk.go b/weed/topology/disk.go index c159c4cca..37d5e1272 100644 --- a/weed/topology/disk.go +++ b/weed/topology/disk.go @@ -48,11 +48,11 @@ func (d *DiskUsages) negative() *DiskUsages { t := newDiskUsages() for diskType, b := range d.usages { a := t.getOrCreateDisk(diskType) - a.volumeCount = - b.volumeCount - a.remoteVolumeCount = - b.remoteVolumeCount - a.activeVolumeCount = - b.activeVolumeCount - a.ecShardCount = - b.ecShardCount - a.maxVolumeCount = - b.maxVolumeCount + a.volumeCount = -b.volumeCount + a.remoteVolumeCount = -b.remoteVolumeCount + a.activeVolumeCount = -b.activeVolumeCount + a.ecShardCount = -b.ecShardCount + a.maxVolumeCount = -b.maxVolumeCount } return t @@ -68,7 +68,7 @@ func (d *DiskUsages) ToMap() interface{} { return ret } -func (d *DiskUsages) ToDiskInfo() (map[string]*master_pb.DiskInfo) { +func (d *DiskUsages) ToDiskInfo() map[string]*master_pb.DiskInfo { ret := make(map[string]*master_pb.DiskInfo) for diskType, diskUsageCounts := range d.usages { m := &master_pb.DiskInfo{ diff --git a/weed/topology/node.go b/weed/topology/node.go index f9ac890ef..95d63972e 100644 --- a/weed/topology/node.go +++ b/weed/topology/node.go @@ -39,7 +39,7 @@ type NodeImpl struct { diskUsages *DiskUsages id NodeId parent Node - sync.RWMutex // lock children + sync.RWMutex // lock children children map[NodeId]Node maxVolumeId needle.VolumeId |
