diff options
| author | chrislu <chris.lu@gmail.com> | 2022-03-21 00:04:01 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-03-21 00:04:01 -0700 |
| commit | 57c6eddd223875b6a1ed04cc87c00b9188f745b7 (patch) | |
| tree | 45bad0f536bf9fd4fcfb874c88a32567d2892275 | |
| parent | 80c14877d36835b6f814268cae339e02a7bdc3a8 (diff) | |
| download | seaweedfs-57c6eddd223875b6a1ed04cc87c00b9188f745b7.tar.xz seaweedfs-57c6eddd223875b6a1ed04cc87c00b9188f745b7.zip | |
avoid possible deadlock if volume layout is used in some logs
| -rw-r--r-- | weed/topology/volume_layout.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go index dbfb439bd..64e196032 100644 --- a/weed/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -140,9 +140,7 @@ func NewVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, diskType } 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) + return fmt.Sprintf("rp:%v, ttl:%v, writables:%v, volumeSizeLimit:%v", vl.rp, vl.ttl, vl.writables, vl.volumeSizeLimit) } func (vl *VolumeLayout) RegisterVolume(v *storage.VolumeInfo, dn *DataNode) { |
