Skip to content
Snippets Groups Projects

Minor retry tuning to improve behavior under failing conditions.

Merged Nick Mathewson requested to merge nickm/arti:retry_tuning_1 into main
  1. Mar 31, 2022
  2. Mar 30, 2022
    • Nick Mathewson's avatar
      Use a lower default for max_retries. · 432bb5ce
      Nick Mathewson authored
      The older default seems (experimentally) to be ridiculously high.
      Generally, if we can't build a circuit within a handful attempts,
      that circuit has already timed out... unless there is a fast-failure
      condition, in which case we're just hammering the network (or our
      view of it.)
      
      Found with `arti-testing` for #329.
      432bb5ce
    • Nick Mathewson's avatar
      circmgr: limit circuit attempts when launch_parallelism > 1. · bd798764
      Nick Mathewson authored
      Previously, if we had launch_parallelism > 1, and we were willing to
      retry building a circuit max_retries times, then we'd launch up to
      max_retries * launch_parallelism circuits before giving up.  Ouch!
      
      With this patch, we try to keep the total number of circuits
      planned and attempted to the actual max_retries limit.
      
      Part of #329; found with arti-testing.
      bd798764
    • Nick Mathewson's avatar
      dirmgr: fix bugs in algorithm for retrying downloads · 6e8c982a
      Nick Mathewson authored
      The previous algorithm had two flaws:
      
        * It would wait even after the final attempt, when there were no
          more retries to do.
        * It would fail to wait between attempts if an error occurred.
      
      This refactoring fixes both of these issues, and adds some comments.
      6e8c982a
Loading