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
fail fast when protocol exp #12361
fail fast when protocol exp #12361
Conversation
...ubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
Outdated
Show resolved
Hide resolved
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.
Do we prepend to do this type check at initialization time. I think this modification is in the notify process. If dirty data is wrongly written in the registry (or an updated protocol, which usually occurs in the version iteration process), this will cause the processing of this push to be directly abnormal. , causing a greater impact.
Codecov Report
@@ Coverage Diff @@
## 3.2 #12361 +/- ##
============================================
- Coverage 69.64% 69.33% -0.32%
+ Complexity 341 2 -339
============================================
Files 3435 1622 -1813
Lines 161622 66857 -94765
Branches 27079 9802 -17277
============================================
- Hits 112566 46356 -66210
+ Misses 39169 16013 -23156
+ Partials 9887 4488 -5399 see 1936 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The above is the thread stack of the current protocol verification, which is located in the process ReferenceConfig.init -> ReferenceConfig.createInvoker. Before the metadata is pushed, it seems that the registration center has not yet been pushed. Where do you want the protocol validation to be? |
Before listen registry. In |
ok |
408b5ec
to
ee5bd10
Compare
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.
org.apache.dubbo.registry.support.AbstractRegistry#subscribe
Kudos, SonarCloud Quality Gate passed! |
if (t instanceof SkipFailbackWrapperException) { | ||
throw t; | ||
} |
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.
Is these still necessary
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.
will remove it
What is the purpose of the change
fix #12359
pr #12316 modifies the status when the module fails to start, thus preventing DefaultApplicationDeployer#prepareApplicationInstance from running.
In addition to exposing metadataService, prepareApplicationInstance also includes protocol extension verification. When the comsumer configures the wrong protocol, the wrong prompt is printed.
Brief changelog
There is no problem with the modification of pr #12316. We need to fail fast when building the Invoker step to verify the serialization protocol, and do not perform subsequent steps
Verifying this change
Following the steps in #12359, gives the expected result