Skip to content
Snippets Groups Projects

lib/selection: fix interaction of timeouts with reboots

Merged Vladimír Čunát requested to merge selection into master
All threads resolved!

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).

Fixes #722 (closed)

Edited by Vladimír Čunát

Merge request reports

Pipeline #96405 failed

Pipeline: Knot Resolver

#96406

    Pipeline failed for b0674c36 on selection

    Approved by

    Merged by Tomas KrizekTomas Krizek 3 years ago (Mar 14, 2022 10:17am UTC)

    Merge details

    Pipeline #96474 passed with warnings

    Pipeline passed with warnings for b21b33ba on master

    Activity

    Filter activity
    • Approvals
    • Assignees & reviewers
    • Comments (from bots)
    • Comments (from users)
    • Commits & branches
    • Edits
    • Labels
    • Lock status
    • Mentions
    • Merge request status
    • Tracking
    Please register or sign in to reply
    Loading