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

fix #8770: provider remove @Lazy support. #8854

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

changfubai
Copy link
Contributor

@changfubai changfubai commented Sep 20, 2021

What is the purpose of the change

provider doesn't expose to registry if add @lazy annotation.
in issue #829 , @pinxiong said, dubbo:service don't support lazy initialization, I just remove lazy support in method registerServiceBean.

Brief changelog

Verifying this change

Checklist

  • 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.
  • 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.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • 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.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@changfubai
Copy link
Contributor Author

ut LazyInitDubboAnnotationTest still pass.

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2021

Codecov Report

Merging #8854 (4ff905c) into master (921e113) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8854      +/-   ##
============================================
+ Coverage     60.73%   60.75%   +0.01%     
+ Complexity      448      447       -1     
============================================
  Files          1100     1100              
  Lines         44422    44419       -3     
  Branches       6469     6468       -1     
============================================
+ Hits          26980    26986       +6     
+ Misses        14466    14460       -6     
+ Partials       2976     2973       -3     
Impacted Files Coverage Δ
.../factory/annotation/ServiceClassPostProcessor.java 87.50% <ø> (-0.26%) ⬇️
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0.00%> (-3.51%) ⬇️
...apache/dubbo/common/extension/ExtensionLoader.java 81.10% <0.00%> (+0.21%) ⬆️
...dubbo/remoting/exchange/support/DefaultFuture.java 89.18% <0.00%> (+0.90%) ⬆️
...ting/zookeeper/curator/CuratorZookeeperClient.java 70.11% <0.00%> (+1.14%) ⬆️
.../src/main/java/org/apache/dubbo/rpc/RpcStatus.java 73.80% <0.00%> (+1.19%) ⬆️
...ubbo/registry/support/AbstractRegistryFactory.java 83.09% <0.00%> (+2.81%) ⬆️
.../apache/dubbo/remoting/transport/AbstractPeer.java 63.04% <0.00%> (+4.34%) ⬆️
...ng/transport/dispatcher/all/AllChannelHandler.java 89.65% <0.00%> (+6.89%) ⬆️

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 921e113...4ff905c. Read the comment docs.

@AlbumenJ AlbumenJ merged commit 6dc1730 into apache:master Sep 21, 2021
@beyondlex
Copy link

I think we should keep the beans annotated with @DubboService lazy-able: when we want to set lazy-initialization globally (spring.main.lazy-initialization=true) except the beans that are annotated with @DubboService, we prefer a non-lazy Dubbo service, with this feature we could put @Lazy(false) on the service class, but now this extensibility is lost.

@AlbumenJ
Copy link
Member

I think we should keep the beans annotated with @DubboService lazy-able: when we want to set lazy-initialization globally (spring.main.lazy-initialization=true) except the beans that are annotated with @DubboService, we prefer a non-lazy Dubbo service, with this feature we could put @Lazy(false) on the service class, but now this extensibility is lost.

Dubbo Service is a service publisher, and its design does not support the lazy attribute.

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.

4 participants