Skip to content
Snippets Groups Projects
  1. Mar 14, 2022
    • Vladimír Čunát's avatar
      lib/selection: fix interaction of timeouts with reboots · 03d24b4b
      Vladimír Čunát authored
      We use "monotonic" time-stamps for the dead_since field;
      that breaks on system reboots, in which case we reset the stats.
      (if the server was categorized as dead)
      
      If the server times out afterwards, we'd fail the condition
      `cur_state.consecutive_timeouts == old_state.consecutive_timeouts`
      so its stats would not update.  Therefore we'd get stuck forever
      in a state where the unusable server has high priority (no_rtt_info).
      
      This commit changes a bit more than was necessary to fix this,
      including precision of the stats (in some cases).
      Verified
      03d24b4b
  2. Mar 10, 2022
    • Vladimír Čunát's avatar
      lib/selection: improve randomness of ties · b9c2580e
      Vladimír Čunát authored
      The approach was dubious: random shuffle, qsort() and choose the first.
      The main functional problem was that qsort() isn't a stable sort,
      so the effect of pre-shuffling is not reliable, even though I don't have
      any evidence of this causing issues in practice.
      
      The new code should also be a bit more efficient in terms of CPU and
      consumed randomness, but that probably won't be noticeable.
      The arrays passed into select_transport() are now const (no sorting),
      which could make the code easier to "understand".
      Verified
      b9c2580e
  3. Mar 09, 2022
  4. Mar 08, 2022
  5. Mar 07, 2022
  6. Mar 04, 2022
  7. Mar 01, 2022
  8. Feb 28, 2022
  9. Feb 22, 2022
  10. Feb 18, 2022
  11. Feb 07, 2022
  12. Feb 04, 2022
Loading