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

When making a generic dubbo service request, setting check to true co… #7599

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

goodjava
Copy link
Contributor

@goodjava goodjava commented Apr 21, 2021

当多次泛化调用一个上游接口的时候,当你填写的check=true并且此时上游调用不通(服务下线,或者你的代码是网关,并没有填对group或者version),就会触发内存泄露.内存泄露的同时还会触发大量的notify(有的时候这个更可怕一些)
测试代码
test
error1
error2
修改代码后
ok

info

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2021

Codecov Report

Merging #7599 (ca84d7c) into master (6ec857a) will increase coverage by 0.45%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7599      +/-   ##
============================================
+ Coverage     58.67%   59.12%   +0.45%     
- Complexity      494      530      +36     
============================================
  Files          1076     1076              
  Lines         43421    43444      +23     
  Branches       6341     6346       +5     
============================================
+ Hits          25477    25687     +210     
+ Misses        15110    14930     -180     
+ Partials       2834     2827       -7     
Impacted Files Coverage Δ Complexity Δ
...e/dubbo/registry/integration/DynamicDirectory.java 67.32% <50.00%> (+4.95%) 0.00 <0.00> (ø)
...dubbo/rpc/cluster/directory/AbstractDirectory.java 89.47% <100.00%> (+0.28%) 0.00 <0.00> (ø)
...dubbo/remoting/exchange/support/DefaultFuture.java 80.34% <0.00%> (-6.84%) 0.00% <0.00%> (ø%)
...e/dubbo/remoting/transport/netty4/NettyClient.java 69.56% <0.00%> (-1.45%) 0.00% <0.00%> (ø%)
.../dubbo/remoting/transport/netty4/NettyChannel.java 62.37% <0.00%> (-1.00%) 0.00% <0.00%> (ø%)
...n/java/org/apache/dubbo/common/utils/NetUtils.java 66.66% <0.00%> (-0.35%) 0.00% <0.00%> (ø%)
...apache/dubbo/common/extension/ExtensionLoader.java 78.17% <0.00%> (+0.22%) 0.00% <0.00%> (ø%)
.../dubbo/registry/integration/RegistryDirectory.java 76.84% <0.00%> (+0.33%) 0.00% <0.00%> (ø%)
...org/apache/dubbo/registry/redis/RedisRegistry.java 49.01% <0.00%> (+0.39%) 27.00% <0.00%> (+1.00%)
.../java/org/apache/dubbo/config/ReferenceConfig.java 65.87% <0.00%> (+0.47%) 0.00% <0.00%> (ø%)
... and 30 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 6ec857a...ca84d7c. Read the comment docs.

Copy link
Contributor

@xiaoheng1 xiaoheng1 left a comment

Choose a reason for hiding this comment

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

consumerUrl can be accessed in the subclass, so we don’t need to define another method. do you think so ?

In addition, can you help verify whether the memory leak problem will occur under non-generalized calls? I checked the code, and the non-generalized calls to unsubscribe should also have this problem.

@goodjava
Copy link
Contributor Author

goodjava commented Apr 22, 2021

一般的调用也存在这个问题的.只不过普通调用如果check=true(我指的是通过spring拉起来那种),程序就会崩溃(倒是符合他这个check的预期
,所以触发不了这个问题.但如果自己起的的我也测了:
zzy
)

@xiaoheng1
Copy link
Contributor

一般的调用也存在这个问题的.只不过普通调用如果check=true(我指的是通过spring拉起来那种),程序就会崩溃(倒是符合他这个check的预期
,所以触发不了这个问题.但如果自己起的的我也测了:
zzy
)

Got it, thanks.

Copy link
Contributor

@xiaoheng1 xiaoheng1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@xiaoheng1 xiaoheng1 left a comment

Choose a reason for hiding this comment

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

LGTM

@AlbumenJ AlbumenJ merged commit 25b0e2a into apache:master Apr 27, 2021
goodjava added a commit to WZD-MI/incubator-dubbo that referenced this pull request May 6, 2021
vio-lin added a commit to vio-lin/incubator-dubbo that referenced this pull request Feb 22, 2023
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.

None yet

4 participants