Browse Source
Merge pull request #1383 from robin1900/master
fix dn.volumes Iterate when write issue
pull/1388/head
Chris Lu
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
weed/topology/data_node.go
|
@ -199,6 +199,8 @@ func (dn *DataNode) ToDataNodeInfo() *master_pb.DataNodeInfo { |
|
|
|
|
|
|
|
|
// GetVolumeIds returns the human readable volume ids limited to count of max 100.
|
|
|
// GetVolumeIds returns the human readable volume ids limited to count of max 100.
|
|
|
func (dn *DataNode) GetVolumeIds() string { |
|
|
func (dn *DataNode) GetVolumeIds() string { |
|
|
|
|
|
dn.RLock() |
|
|
|
|
|
defer dn.RUnlock() |
|
|
ids := make([]int, 0, len(dn.volumes)) |
|
|
ids := make([]int, 0, len(dn.volumes)) |
|
|
|
|
|
|
|
|
for k := range dn.volumes { |
|
|
for k := range dn.volumes { |
|
|