Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Multiple improvements to discovery ping handling #8771

Merged
merged 8 commits into from
Jul 11, 2018

Commits on Jul 7, 2018

  1. discovery: Refactor packet creation into its own function.

    This function is useful inside unit tests.
    jimpo committed Jul 7, 2018
    Configuration menu
    Copy the full SHA
    44c4299 View commit details
    Browse the repository at this point in the history
  2. discovery: Only add nodes to routing table after receiving pong.

    Previously the discovery algorithm would add nodes to the routing table
    before confirming that the endpoint is participating in the protocol. This
    now tracks in-flight pings and adds to the routing table only after receiving
    a response.
    jimpo committed Jul 7, 2018
    Configuration menu
    Copy the full SHA
    58d323b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7dc960e View commit details
    Browse the repository at this point in the history
  4. discovery: Track expiration of pings to non-yet-in-bucket nodes.

    Now that we may ping nodes before adding to a k-bucket, the timeout tracking
    must be separate from BucketEntry.
    jimpo committed Jul 7, 2018
    Configuration menu
    Copy the full SHA
    5e8f2c9 View commit details
    Browse the repository at this point in the history
  5. discovery: Verify echo hash on pong packets.

    Stores packet hash with in-flight requests and matches with pong response.
    jimpo committed Jul 7, 2018
    Configuration menu
    Copy the full SHA
    f86cfd5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b5c87d8 View commit details
    Browse the repository at this point in the history
  7. discovery: Retry failed pings with exponential backoff.

    UDP packets may get dropped, so instead of immediately booting nodes that fail
    to respond to a ping, retry 4 times with exponential backoff.
    jimpo committed Jul 7, 2018
    Configuration menu
    Copy the full SHA
    2ba21de View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c987f37 View commit details
    Browse the repository at this point in the history