mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-06-01 08:12:02 +02:00
Merge fe5305a283
into 0d04264494
This commit is contained in:
commit
943d143bd4
|
@ -638,7 +638,10 @@ func (c *commandVolumeFsck) collectVolumeIds() (volumeIdToServer map[string]map[
|
|||
eachDataNode(topologyInfo, func(dc string, rack RackId, t *master_pb.DataNodeInfo) {
|
||||
for _, diskInfo := range t.DiskInfos {
|
||||
dataNodeId := t.GetId()
|
||||
volumeIdToServer[dataNodeId] = make(map[uint32]VInfo)
|
||||
if _, ok := volumeIdToServer[dataNodeId]; !ok {
|
||||
volumeIdToServer[dataNodeId] = make(map[uint32]VInfo)
|
||||
}
|
||||
volumeCount := 0
|
||||
for _, vi := range diskInfo.VolumeInfos {
|
||||
volumeIdToServer[dataNodeId][vi.Id] = VInfo{
|
||||
server: pb.NewServerAddressFromDataNode(t),
|
||||
|
@ -646,6 +649,7 @@ func (c *commandVolumeFsck) collectVolumeIds() (volumeIdToServer map[string]map[
|
|||
isEcVolume: false,
|
||||
isReadOnly: vi.ReadOnly,
|
||||
}
|
||||
volumeCount += 1
|
||||
}
|
||||
for _, ecShardInfo := range diskInfo.EcShardInfos {
|
||||
volumeIdToServer[dataNodeId][ecShardInfo.Id] = VInfo{
|
||||
|
@ -654,9 +658,10 @@ func (c *commandVolumeFsck) collectVolumeIds() (volumeIdToServer map[string]map[
|
|||
isEcVolume: true,
|
||||
isReadOnly: true,
|
||||
}
|
||||
volumeCount += 1
|
||||
}
|
||||
if *c.verbose {
|
||||
fmt.Fprintf(c.writer, "dn %+v collected %d volumes and locations.\n", dataNodeId, len(volumeIdToServer[dataNodeId]))
|
||||
fmt.Fprintf(c.writer, "dn %+v collected %d volumes and locations.\n", dataNodeId, volumeCount)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue