async file chunk deletion

This commit is contained in:
Chris Lu
2018-11-20 20:56:28 -08:00
parent 5065d4ab2d
commit b282e34dc2
4 changed files with 120 additions and 54 deletions

View File

@@ -66,6 +66,15 @@ func (vc *vidMap) LookupVolumeServer(fileId string) (volumeServer string, err er
return serverUrl, nil
}
func (vc *vidMap) GetVidLocations(vid string) (locations []Location) {
id, err := strconv.Atoi(vid)
if err != nil {
glog.V(1).Infof("Unknown volume id %s", vid)
return nil
}
return vc.GetLocations(uint32(id))
}
func (vc *vidMap) GetLocations(vid uint32) (locations []Location) {
vc.RLock()
defer vc.RUnlock()