Skip to content

Retry downloads from the original repo address if the file was not found on a mirror

Tobias_Groza requested to merge Tobias_Groza/fdroidclient:retry_mirror into master

After a repository was updated, the mirrors need some time to sync the changes. In the meantime, users who got the index file from the main repo can try to download an APK from one of the outdated mirrors. The app proceeds by showing a toast saying "The requested file was not found". That is bad UX, because the users are notified notified about available updates which they want to install, but F-Droid is unable to do that.

This issue is resolved by retrying the download using the original repo address.
Disadvantage of this approach: higher load on the main repo after an index update. I do not know the statistics, but I guess, the main repo is getting the most requests after an index update usually. So this might decrease the overall performance.

Other probable solutions:

  • Retry with all other mirrors before using the main repo.
    Disadvantage: many requests, putting higher load on many or all mirrors.
  • Do not notify about updates instantly.
    Disadvantage: Critical bug fixes or security patches do not get to the user quickly.
  • Communicate the reason for the file not being available. E.g. if the index file is not older than x hours, show a toast "could not get file from mirror which might be outdated.".
    Disadvantage: Does not solve the problem, but helps the user to understand the problem
Edited by Tobias_Groza

Merge request reports