-
Notifications
You must be signed in to change notification settings - Fork 917
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: Register service instance after provider config load #694
Conversation
@@ -146,6 +151,20 @@ func (invoker *baseClusterInvoker) doSelectInvoker(lb cluster.LoadBalance, invoc | |||
return selectedInvoker | |||
} | |||
|
|||
func (invoker *baseClusterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result { | |||
if invoker.interceptor != nil { |
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.
if invoker.interceptor == nil {
return nil
}
invoker.interceptor.BeforeInvoker(ctx, invocation)
result := invoker.interceptor.DoInvoke(ctx, invocation)
invoker.interceptor.AfterInvoker(ctx, invocation)
return result
logger.Warn(err) | ||
return nil | ||
} | ||
list, err := metaDataService.GetExportedURLs(constant.ANY_VALUE, constant.ANY_VALUE, constant.ANY_VALUE, constant.ANY_VALUE) |
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.
why not define a new variable with var selectedUrl common.URL
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.
selectedUrl is above
} | ||
selectedUrl = url | ||
// rest first | ||
if url.Protocol == "rest" { |
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.
if break this loop when find rest protocol, is it a problem or bug in multi protocol ?
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.
dubbo in java use rest url first.
Codecov Report
@@ Coverage Diff @@
## 1.5.1 #694 +/- ##
==========================================
+ Coverage 63.89% 63.93% +0.03%
==========================================
Files 239 239
Lines 12752 12795 +43
==========================================
+ Hits 8148 8180 +32
- Misses 3818 3822 +4
- Partials 786 793 +7
Continue to review full report at Codecov.
|
What this PR does:
Register service instance after provider config load
Which issue(s) this PR fixes:
Fixes #686