Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitrate based file provision mistakenly dependent on site instead of cache #11

Closed
HerrHorizontal opened this issue Oct 21, 2020 · 1 comment · Fixed by #17
Closed

Hitrate based file provision mistakenly dependent on site instead of cache #11

HerrHorizontal opened this issue Oct 21, 2020 · 1 comment · Fixed by #17
Labels
bug Something isn't working

Comments

@HerrHorizontal
Copy link
Contributor

HerrHorizontal commented Oct 21, 2020

When the hitrate for a job's input files is computed to make the decision, whether the files are provided by a cache, the drone's sitename is used as a key to check whether it provides the input files instead of looping over all the storages on the according site: https://github.com/tfesenbecker/lapis/blob/dd876d8b0f6519f105c56af8ef735a707df0ae95/lapis/connection.py#L184-L190

This is part of the issue #6 and should also be considered when tackling issue #3.

@HerrHorizontal
Copy link
Contributor Author

@tfesenbecker proposes:

 hitrate = sum( 
     [ 
         file["usedsize"] * file["hitrates"].get(cache.name, 0.0) 
         for file in requested_files.values()  for cache in self.storages[drone.sitename]
     ] 
 ) / sum([file["usedsize"] for file in requested_files.values()]) 

@HerrHorizontal HerrHorizontal added bug Something isn't working invalid This doesn't seem right labels Oct 21, 2020
@eileen-kuehn eileen-kuehn removed the invalid This doesn't seem right label Oct 29, 2020
@eileen-kuehn eileen-kuehn changed the title [Connection] Hitrate based file provision mistakenly dependent on site instead of cache Hitrate based file provision mistakenly dependent on site instead of cache Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants