Browse Source

Update volume_grpc_erasure_coding.go , fix no space left bug (#6077)

pull/6079/head
coffeecloudgit 3 months ago
committed by GitHub
parent
commit
dad3a26fb6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      weed/server/volume_grpc_erasure_coding.go

12
weed/server/volume_grpc_erasure_coding.go

@ -150,8 +150,10 @@ func (vs *VolumeServer) VolumeEcShardsCopy(ctx context.Context, req *volume_serv
}) })
} else { } else {
location = vs.store.FindFreeLocation(func(location *storage.DiskLocation) bool { location = vs.store.FindFreeLocation(func(location *storage.DiskLocation) bool {
_, found := location.FindEcVolume(needle.VolumeId(req.VolumeId))
return found
//(location.FindEcVolume) This method is error, will cause location is nil, redundant judgment
// _, found := location.FindEcVolume(needle.VolumeId(req.VolumeId))
// return found
return true
}) })
} }
if location == nil { if location == nil {
@ -191,12 +193,6 @@ func (vs *VolumeServer) VolumeEcShardsCopy(ctx context.Context, req *volume_serv
return err return err
} }
} }
if req.CopyEcxFile { //when location no volume before copy
glog.V(0).Infof("Re LoadNewVolumes: %v", req)
vs.store.LoadNewVolumes()
}
return nil return nil
}) })
if err != nil { if err != nil {

Loading…
Cancel
Save