mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 11:09:12 +08:00
Co-authored-by: wang wusong <wangwusong@virtaitech.com>
This commit is contained in:
parent
0bffb3770f
commit
9bdbf9c880
@ -248,7 +248,6 @@ func (n *NodeImpl) CollectDeadNodeAndFullVolumes(freshThreshHold int64, volumeSi
|
||||
if n.IsRack() {
|
||||
for _, c := range n.Children() {
|
||||
dn := c.(*DataNode) //can not cast n to DataNode
|
||||
dn.RLock()
|
||||
for _, v := range dn.GetVolumes() {
|
||||
topo := n.GetTopology()
|
||||
diskType := types.ToDiskType(v.DiskType)
|
||||
@ -278,7 +277,6 @@ func (n *NodeImpl) CollectDeadNodeAndFullVolumes(freshThreshHold int64, volumeSi
|
||||
}
|
||||
}
|
||||
}
|
||||
dn.RUnlock()
|
||||
}
|
||||
} else {
|
||||
for _, c := range n.Children() {
|
||||
|
@ -183,20 +183,6 @@ func (t *Topology) batchVacuumVolumeCommit(grpcDialOption grpc.DialOption, vl *V
|
||||
}
|
||||
|
||||
if isCommitSuccess {
|
||||
//reset all vacuumed volumes size
|
||||
for _, dn := range vacuumLocationList.list {
|
||||
vInfo, err := dn.GetVolumesById(vid)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("get volume info for volume: %d failed %v", vid, err)
|
||||
return false
|
||||
}
|
||||
|
||||
dn.Lock()
|
||||
disk := dn.getOrCreateDisk(vInfo.DiskType)
|
||||
vInfo.Size = 0
|
||||
disk.doAddOrUpdateVolume(vInfo)
|
||||
dn.Unlock()
|
||||
}
|
||||
|
||||
//record vacuum time of volume
|
||||
vl.accessLock.Lock()
|
||||
|
Loading…
Reference in New Issue
Block a user