satellite/gracefulexit: use nodecache with gracefulexit

Change-Id: I700caf6dfd06bd3b3970a8cf7c5a79da4af27b5f
This commit is contained in:
Márton Elek 2021-10-25 12:14:59 +02:00 committed by Elek, Márton
parent 98b59fe305
commit fb604be460

View File

@ -343,14 +343,9 @@ func (service *Service) IsOnline(node *NodeDossier) bool {
}
// FindStorageNodesForGracefulExit searches the overlay network for nodes that meet the provided requirements for graceful-exit requests.
//
// The main difference between this method and the normal FindStorageNodes is that here we avoid using the cache.
func (service *Service) FindStorageNodesForGracefulExit(ctx context.Context, req FindStorageNodesRequest) (_ []*SelectedNode, err error) {
defer mon.Task()(&ctx)(&err)
if service.config.Node.AsOfSystemTime.Enabled && service.config.Node.AsOfSystemTime.DefaultInterval < 0 {
req.AsOfSystemInterval = service.config.Node.AsOfSystemTime.DefaultInterval
}
return service.FindStorageNodesWithPreferences(ctx, req, &service.config.Node)
return service.UploadSelectionCache.GetNodes(ctx, req)
}
// FindStorageNodesForUpload searches the overlay network for nodes that meet the provided requirements for upload.