Browse Source

volume: lock writables changes

pull/1020/head
Chris Lu 6 years ago
parent
commit
4b15c8f0c4
  1. 3
      weed/topology/topology_vacuum.go

3
weed/topology/topology_vacuum.go

@ -46,7 +46,10 @@ func batchVacuumVolumeCheck(grpcDialOption grpc.DialOption, vl *VolumeLayout, vi
return isCheckSuccess
}
func batchVacuumVolumeCompact(grpcDialOption grpc.DialOption, vl *VolumeLayout, vid needle.VolumeId, locationlist *VolumeLocationList, preallocate int64) bool {
vl.accessLock.Lock()
vl.removeFromWritable(vid)
vl.accessLock.Unlock()
ch := make(chan bool, locationlist.Length())
for index, dn := range locationlist.list {
go func(index int, url string, vid needle.VolumeId) {

Loading…
Cancel
Save