diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-07-08 09:53:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-08 09:53:08 -0700 |
| commit | 6360824dd280522b39af3ca773564139118f8455 (patch) | |
| tree | 0631f303afbb699ebf0a138712ed4b06d71a60e7 | |
| parent | 54d6b3c30f27e34f5d55827ea54efaf8a95add4f (diff) | |
| parent | dad1161c7002d074ef87e4b9279881e4e4a6e426 (diff) | |
| download | seaweedfs-6360824dd280522b39af3ca773564139118f8455.tar.xz seaweedfs-6360824dd280522b39af3ca773564139118f8455.zip | |
Merge pull request #1383 from robin1900/master
fix dn.volumes Iterate when write issue
| -rw-r--r-- | weed/topology/data_node.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index d18dd6af0..efdf5285b 100644 --- a/weed/topology/data_node.go +++ b/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. func (dn *DataNode) GetVolumeIds() string { + dn.RLock() + defer dn.RUnlock() ids := make([]int, 0, len(dn.volumes)) for k := range dn.volumes { |
