Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p/dnsdisc: fix hot-spin when all trees are empty #22313

Merged
merged 11 commits into from
Feb 19, 2021

Commits on Feb 11, 2021

  1. p2p/dnsdisc: fix hot-spin when all trees are empty

    In the random sync algorithm used by the DNS node iterator, we first
    pick a random tree and then perform one sync action on that tree. This
    happens in a loop until any node is found. If no trees contain any
    nodes, the iterator would just keep starting over in a hot loop,
    spinning at 100% CPU.
    
    The fix is a bit complicated. The iterator now checks if any sync action
    can be performed on the tree before selecting it. If no action can be
    performed on any tree, it waits for the closest root record recheck time
    to arrive and then tries again.
    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    3ee8d93 View commit details
    Browse the repository at this point in the history
  2. p2p/dnsdisc: improve test

    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    1a30f38 View commit details
    Browse the repository at this point in the history
  3. p2p/dnsdisc: improve test

    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    21ce379 View commit details
    Browse the repository at this point in the history
  4. p2p/dnsdisc: fix lint issue

    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    e46d619 View commit details
    Browse the repository at this point in the history
  5. p2p/dnsdisc: remove rootWait

    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    66cc151 View commit details
    Browse the repository at this point in the history
  6. p2p/dnsdisc: fix shutdown issue

    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    6e211bc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e0d0029 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e4b3b5b View commit details
    Browse the repository at this point in the history
  9. p2p/dnsdisc: reword comments

    fjl committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    b2a9c66 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2021

  1. Configuration menu
    Copy the full SHA
    1278699 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aaf03bb View commit details
    Browse the repository at this point in the history