-
Notifications
You must be signed in to change notification settings - Fork 929
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
fix PolarisServiceWatcher bug and add ZookeeperServiceDiscovery ut #1988
Conversation
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.47.0 to 1.48.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.47.0...v1.48.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@chuntaojun pls review pr |
Codecov Report
@@ Coverage Diff @@
## 3.0 #1988 +/- ##
==========================================
+ Coverage 44.38% 44.56% +0.18%
==========================================
Files 283 283
Lines 17041 17055 +14
==========================================
+ Hits 7563 7601 +38
+ Misses 8672 8651 -21
+ Partials 806 803 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. |
registry/polaris/core.go
Outdated
} | ||
case <-time.After(20 * time.Second): |
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.
我理解阻塞在这个 select 应该没问题吧?
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.
阻塞20秒以后再执行,所以先执行上面的,上面的如果20秒还没有执行完,重新执行说明上面的bug,当然是否可以用户自定义,另外20秒是否过长,这个在dubbo yaml配置文件里面可以用户自定义配置
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.
感觉完全没有必要在在外层加一个for
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.
感觉完全没有必要在在外层加一个for
大佬要不一起来DingTalk:44817370 一起聊下?
registry/polaris/core.go
Outdated
} | ||
case <-time.After(1 * time.Second): |
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.
感觉这个是可以移除的,应该不太需求
ConsumerAPI.Subscribe 只需要执行一次,如果 Subscribe,可能是 SDK 内返回了类似 Busy 类的错误,因此需要先保证 ConsumerAPI.Subscribe 一定成功,成功之后,会返回一个用于订阅的 chan,这个chan需要走 for range or for select 的语句不断消费 chan 里面的实例变化事件,如果 chan 被 sdk 内部逻辑 close 的话,那么就又会走到外层的循环进行再次发起订阅动作,如果内部for发生错误,跳出当前for,继续执行监听事件