forked from rucio/rucio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transfers: implement source selection strategies
Try to be more generic in the source filtering and selection code. Introduce a SourceRankingStrategy class, which has an `apply` method to actually apply the strategy to a source and decide what to do with a source. Some strategies are filter-only: i.e. they only decide if a source has to be ignored or not. Others are also ranking strategies: they can return an integer which defines the cost of the source according to this strategy. The order of ranking strategies is important: it defines the order in which the costs will be compared to sort the sources. This change will definitely introduce some computational and memory overhead, but I hope it will be low. Instead of hard-coded `filter()` calls which are done once per request, now we have multiple object traversals and function calls for each source of each request.
- Loading branch information
Radu Carpa
committed
Nov 9, 2023
1 parent
4380d02
commit 336603e
Showing
3 changed files
with
323 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.