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

Fixed the searchRing function for consistentHash #2460

Merged
merged 5 commits into from
Aug 2, 2023

Commits on Aug 2, 2023

  1. minor: added different colors for different endpoints in fadein graphs

    Signed-off-by: Roman Zavodskikh <[email protected]>
    Roman Zavodskikh committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    43f66de View commit details
    Browse the repository at this point in the history
  2. Added test for even load between not fading in endpoints

    Signed-off-by: Roman Zavodskikh <[email protected]>
    Roman Zavodskikh committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    75b2749 View commit details
    Browse the repository at this point in the history
  3. Fixed the searchRing function for consistentHash

    This fix is needed to comply the requirements of input
    for binary search https://pkg.go.dev/sort#Search
    
    Search uses binary search to find and return the smallest index i
    in [0, n) at which f(i) is true, assuming that on the range
    [0, n), f(i) == true implies f(i+1) == true.
    That is, Search requires that f is false for some (possibly empty)
    prefix of the input range [0, n) and then true for
    the (possibly empty) remainder
    
    Signed-off-by: Roman Zavodskikh <[email protected]>
    Roman Zavodskikh committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    f8c0833 View commit details
    Browse the repository at this point in the history
  4. Added test that LBAlgorithm.Apply finishes with all endpoints fading

    Signed-off-by: Roman Zavodskikh <[email protected]>
    Roman Zavodskikh committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    7d3f70e View commit details
    Browse the repository at this point in the history
  5. minor: get rid of repeatable code

    Signed-off-by: Roman Zavodskikh <[email protected]>
    Roman Zavodskikh committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    af3d546 View commit details
    Browse the repository at this point in the history