aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/volume_layout.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-11-22 20:29:17 +0800
committerGitHub <noreply@github.com>2020-11-22 20:29:17 +0800
commit9aa990f80f8af70628c72eaf0c20d445c15b9e9d (patch)
tree2dd4ed5551515b207074bf27908432b0293cd321 /weed/topology/volume_layout.go
parente8296104fc715f0f7c41a82059f366603b3e94f0 (diff)
parent92f906b6fcce2ef72661bb825075e2826b8f3aa1 (diff)
downloadseaweedfs-9aa990f80f8af70628c72eaf0c20d445c15b9e9d.tar.xz
seaweedfs-9aa990f80f8af70628c72eaf0c20d445c15b9e9d.zip
Merge pull request #39 from chrislusf/master
sync
Diffstat (limited to 'weed/topology/volume_layout.go')
-rw-r--r--weed/topology/volume_layout.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go
index ffe36e95b..4c9c84459 100644
--- a/weed/topology/volume_layout.go
+++ b/weed/topology/volume_layout.go
@@ -132,6 +132,8 @@ func NewVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, volumeSi
}
func (vl *VolumeLayout) String() string {
+ vl.accessLock.RLock()
+ defer vl.accessLock.RUnlock()
return fmt.Sprintf("rp:%v, ttl:%v, vid2location:%v, writables:%v, volumeSizeLimit:%v", vl.rp, vl.ttl, vl.vid2location, vl.writables, vl.volumeSizeLimit)
}