Skip to content
Snippets Groups Projects
  • Vladimír Čunát's avatar
    03d24b4b
    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
    History
    lib/selection: fix interaction of timeouts with reboots
    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).