-
Notifications
You must be signed in to change notification settings - Fork 9
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
add keepalive #14
add keepalive #14
Conversation
/assign @horizonzy |
Could we use a watcher to listen to connection events? It's more graceful. |
|
Nicely done, could you add a test for cover this case? |
Ok. |
@day253 sign CLA please. |
@horizonzy please confirm and handle this PR. |
We deployed this to our production environment. But the difference is when Deregister is called we will cancel the keepalive goroutine. @horizonzy Should we add this function? |
If we have the test to test the keepalive function. We should have two method. The first one is to delete the registered node. The other one is delete the registered node and cancel the keepalive function. But now the Deregister is almost the same as deleteNode. |
registry/registry.go
Outdated
} | ||
} | ||
|
||
func (z *zookeeperRegistry) ensureName(path string, data []byte, flags int32) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function's name doesn't express what it wants to ensure. Maybe a different name would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Sorry for the delay reply, I'm watching now. |
Yes, if the service already be deregister, we shouldn't make it keep-alive anymore. |
We can delete the node path using zk directly, not using the registry.go function. |
@horizonzy I have fixed all the comments. |
cc @bodhisatan |
get, i'm reviewing it |
Sorry, I haven't used Go for over a year, I am worried that I might not have the ability to review. Please help to review it, thanks! @bodhisatan |
@bodhisatan any idea? |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bodhisatan, day253 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
/assign @horizonzy |
thx |
fix
#10