-
Notifications
You must be signed in to change notification settings - Fork 930
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
Optimize zk ListenServiceEvent listener #343
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #343 +/- ##
===========================================
+ Coverage 66.14% 66.35% +0.21%
===========================================
Files 96 123 +27
Lines 6462 7596 +1134
===========================================
+ Hits 4274 5040 +766
- Misses 1742 2067 +325
- Partials 446 489 +43
Continue to review full report at Codecov.
|
@@ -513,7 +514,7 @@ func (z *ZookeeperClient) GetChildrenW(path string) ([]string, <-chan zk.Event, | |||
return nil, nil, perrors.Errorf("path{%s} has none children", path) | |||
} | |||
if len(children) == 0 { | |||
return nil, nil, perrors.Errorf("path{%s} has none children", path) | |||
return nil, nil, errNilChildren |
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.
i think you should print the zkpath as before, otherwise users don't know what is going on.
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.
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.
@AlexStocks ok.
@@ -544,7 +545,7 @@ func (z *ZookeeperClient) GetChildren(path string) ([]string, error) { | |||
return nil, perrors.Errorf("path{%s} has none children", path) | |||
} | |||
if len(children) == 0 { | |||
return nil, perrors.Errorf("path{%s} has none children", path) | |||
return nil, errNilChildren |
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.
as above
LGTM |
What this PR does:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: