This commit is contained in:
Chris Lu
2021-02-17 20:57:08 -08:00
parent 6daa932f5c
commit 3575d41009
15 changed files with 39 additions and 39 deletions

View File

@@ -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{

View File

@@ -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