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

ring.Lifecycler: Handle when previous ring state is leaving and the number of tokens has changed #79

Merged
merged 25 commits into from
Jun 7, 2023

Commits on Jun 7, 2023

  1. ring.Lifecycler: Add test for when previous ring state is leaving and…

    … diff tokens
    
    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    a03a77c View commit details
    Browse the repository at this point in the history
  2. ring.Lifecycler: Handle when previous ring state is leaving and diff …

    …tokens
    
    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    aae6c09 View commit details
    Browse the repository at this point in the history
  3. Add changelog entry

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    f433e00 View commit details
    Browse the repository at this point in the history
  4. Fix typos

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    6bb6223 View commit details
    Browse the repository at this point in the history
  5. Use GetState() instead of accessing state directly

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    a4db120 View commit details
    Browse the repository at this point in the history
  6. ring: Handle decreasing number of tokens

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    f018f6d View commit details
    Browse the repository at this point in the history
  7. ring: Fix tests

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    edfb8b6 View commit details
    Browse the repository at this point in the history
  8. Assign default value for tokens.

    * Without this, if an ingester leave the ring with the same number of
      tokens as the new one joining, the new ingester will be assigned nil
      tokens.
    DylanGuedes authored and aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    d7747c7 View commit details
    Browse the repository at this point in the history
  9. Fix tests

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    18c78ae View commit details
    Browse the repository at this point in the history
  10. Simplify code

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    a82904e View commit details
    Browse the repository at this point in the history
  11. initRing: Always switch from LEAVING to ACTIVE state

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    e55b1a7 View commit details
    Browse the repository at this point in the history
  12. Simplify code for calculating tokens

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    e6b6d09 View commit details
    Browse the repository at this point in the history
  13. Improve tests

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    be2f240 View commit details
    Browse the repository at this point in the history
  14. When dropping tokens, randomize

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    daf07f8 View commit details
    Browse the repository at this point in the history
  15. Fix shuffle

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    3ed54ed View commit details
    Browse the repository at this point in the history
  16. Fix logging of state

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    9e7c8b0 View commit details
    Browse the repository at this point in the history
  17. Augment tests

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    2ecfb2c View commit details
    Browse the repository at this point in the history
  18. Update ring/lifecycler.go

    Co-authored-by: Marco Pracucci <marco@pracucci.com>
    aknuds1 and pracucci committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    cc0d394 View commit details
    Browse the repository at this point in the history
  19. Update ring/lifecycler.go

    Co-authored-by: Marco Pracucci <marco@pracucci.com>
    aknuds1 and pracucci committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    8b14cda View commit details
    Browse the repository at this point in the history
  20. Update ring/lifecycler.go

    Co-authored-by: Marco Pracucci <marco@pracucci.com>
    aknuds1 and pracucci committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    703c0b6 View commit details
    Browse the repository at this point in the history
  21. Update ring/lifecycler.go

    Co-authored-by: Marco Pracucci <marco@pracucci.com>
    aknuds1 and pracucci committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    90c766d View commit details
    Browse the repository at this point in the history
  22. Update ring/lifecycler.go

    Co-authored-by: Marco Pracucci <marco@pracucci.com>
    aknuds1 and pracucci committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    6d1bbea View commit details
    Browse the repository at this point in the history
  23. Update ring/lifecycler.go

    Co-authored-by: Marco Pracucci <marco@pracucci.com>
    aknuds1 and pracucci committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    c9f047c View commit details
    Browse the repository at this point in the history
  24. Remove TODO

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    301e50b View commit details
    Browse the repository at this point in the history
  25. Improve test readability a bit

    Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
    aknuds1 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    bff82f6 View commit details
    Browse the repository at this point in the history