mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-19 19:53:32 +08:00
master: followers can also lookup and redirect
improve scalability
This commit is contained in:
@@ -95,7 +95,11 @@ func (fs *FilerServer) LookupVolume(ctx context.Context, req *filer_pb.LookupVol
|
||||
return nil, err
|
||||
}
|
||||
var locs []*filer_pb.Location
|
||||
for _, loc := range fs.filer.MasterClient.GetLocations(uint32(vid)) {
|
||||
locations, found := fs.filer.MasterClient.GetLocations(uint32(vid))
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
for _, loc := range locations {
|
||||
locs = append(locs, &filer_pb.Location{
|
||||
Url: loc.Url,
|
||||
PublicUrl: loc.PublicUrl,
|
||||
|
||||
Reference in New Issue
Block a user