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

waited for all pods ready during generated hashring initialization #3

Merged
merged 2 commits into from
May 16, 2024

Conversation

christopherzli
Copy link
Collaborator

@christopherzli christopherzli commented May 14, 2024

During the initial controller setup, we prefer to wait over all pods ready before generating hashring.

Deployed in our integrationtest cluster, found

  1. it will wait for all pods ready before generating hashring for first time
  2. else will be no-op if not all pods are ready and replicas do not exist in the local
    This is to handle no replicas information stored in local controller after controller restarts, we should not do anything until the cluster is healthy.

@christopherzli christopherzli requested review from a team, jnyi, hczhu-db and yuchen-db and removed request for jnyi, hczhu-db, yuchen-db and a team May 16, 2024 17:13
Copy link

@jnyi jnyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, if my understanding is correct, it doesn't need to wait for all 3 sts ready but during scaling up, it will update hashring if 1 sts is entirely ready, and then sequentially, so in total it only update the hashring 3 times?

@christopherzli
Copy link
Collaborator Author

lgtm, if my understanding is correct, it doesn't need to wait for all 3 sts ready but during scaling up, it will update hashring if 1 sts is entirely ready, and then sequentially, so in total it only update the hashring 3 times?

@jnyi no, if you look at the code closely, it only saved hashring outside the for statefulsets loop, so will wait for the entire cluster to be ready. Let me know if you have concerns about this behaviour

@christopherzli
Copy link
Collaborator Author

jenkins merge

@christopherzli christopherzli merged commit f8de577 into main May 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants