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

prevent adding duplicate pods #31

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from

Conversation

rfyiamcool
Copy link
Contributor

change

prevent adding duplicate pods in sentinel handler.

@@ -31,6 +31,8 @@ func (h *KVRocksSentinelHandler) ensureKubernetes() error {
if err != nil {
return err
}

h.pods = []string{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you intending to explicitly set h.pods to an empty slice, instead of nil? After h.pods has been default initialized, it doesn't seem to have been used. I have tried debugging and have not found the existence of adding duplicate pods. How can I reproduce it?" @rfyiamcool

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.

2 participants