Skip to content
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

[Dubbo-4771]fix protocol register set false not work #4776

Conversation

tswstarplanet
Copy link
Contributor

What is the purpose of the change

fix #4771

Brief changelog

AbstractServiceConfig.java

Verifying this change

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@tswstarplanet tswstarplanet changed the title fix protocol register set false not work [Dubbo-4771]fix protocol register set false not work Aug 8, 2019
@AnthonyKot
Copy link
Contributor

AnthonyKot commented Aug 13, 2019

Don't think it actually changes something. Now we have all services configured with register=false by default. Soon there is no filter for skipping the registration based on property set we have this:

[DUBBO] Register dubbo service org.apache.dubbo.samples.api.GreetingService url hessian://172.25.26.102:20881/org.apache.dubbo.samples.api.GreetingService?blalbla&[register=false]&release=2.7.4-SNAPSHOT&revision=1.0.0&balblablabla, dubbo version: 2.7.4-SNAPSHOT, current host: 172.25.26.102

As you can see service has register set to false but anyway it was registered.

@tswstarplanet
Copy link
Contributor Author

tswstarplanet commented Aug 13, 2019

@AnthonyKot I test it again and it works. You can watch the zookeeper if the service is registered. It's just the log has an error.

@tswstarplanet tswstarplanet force-pushed the fix_#4771_protocol_register_false_not_work branch from d6c4130 to c21a06b Compare August 13, 2019 20:56
@tswstarplanet tswstarplanet force-pushed the fix_#4771_protocol_register_false_not_work branch from c21a06b to 860b1b6 Compare August 13, 2019 21:02
@codecov-io
Copy link

Codecov Report

Merging #4776 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #4776      +/-   ##
============================================
+ Coverage     63.92%   63.92%   +<.01%     
  Complexity      451      451              
============================================
  Files           769      769              
  Lines         33171    33188      +17     
  Branches       5229     5231       +2     
============================================
+ Hits          21204    21216      +12     
+ Misses         9547     9546       -1     
- Partials       2420     2426       +6
Impacted Files Coverage Δ Complexity Δ
...org/apache/dubbo/config/AbstractServiceConfig.java 100% <ø> (ø) 0 <0> (ø) ⬇️
...in/java/org/apache/dubbo/config/ServiceConfig.java 59.32% <100%> (+0.17%) 0 <0> (ø) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 63.04% <0%> (-2.18%) 0% <0%> (ø)
...he/dubbo/registry/multicast/MulticastRegistry.java 67.87% <0%> (-1.81%) 0% <0%> (ø)
.../dubbo/remoting/transport/netty4/NettyChannel.java 64.7% <0%> (-1.18%) 0% <0%> (ø)
...pache/dubbo/remoting/transport/AbstractServer.java 47.91% <0%> (-1.05%) 0% <0%> (ø)
...mmon/serialize/kryo/utils/AbstractKryoFactory.java 75% <0%> (ø) 0% <0%> (ø) ⬇️
...g/apache/dubbo/registry/consul/ConsulRegistry.java 62.5% <0%> (+0.62%) 29% <0%> (ø) ⬇️
.../exchange/support/header/HeaderExchangeServer.java 67.92% <0%> (+0.94%) 0% <0%> (ø) ⬇️
.../rpc/protocol/dubbo/LazyConnectExchangeClient.java 58.82% <0%> (+2.35%) 0% <0%> (ø) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 897709b...860b1b6. Read the comment docs.

@cvictory cvictory requested a review from beiwei30 September 4, 2019 06:32
@cvictory cvictory added this to the 2.7.4 milestone Sep 4, 2019
Copy link
Member

@beiwei30 beiwei30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @tswstarplanet thanks for catching this bug, it looks like we should revert all default values from org.apache.dubbo.config.AbstractServiceConfig

@beiwei30 beiwei30 merged commit 8798d38 into apache:master Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dubbo:protocol register attribute not work
5 participants