Skip to content

revert computeIfAbsent for jdk related bug#6032

Merged
chickenlj merged 1 commit intoapache:masterfrom
chickenlj:revert-extensionloader
Apr 20, 2020
Merged

revert computeIfAbsent for jdk related bug#6032
chickenlj merged 1 commit intoapache:masterfrom
chickenlj:revert-extensionloader

Conversation

@chickenlj
Copy link
Copy Markdown
Contributor

@chickenlj chickenlj added this to the 2.7.7 milestone Apr 20, 2020
@chickenlj chickenlj self-assigned this Apr 20, 2020
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #6032 into master will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6032      +/-   ##
============================================
- Coverage     61.23%   61.15%   -0.09%     
  Complexity      493      493              
============================================
  Files           991      991              
  Lines         39578    39582       +4     
  Branches       5715     5716       +1     
============================================
- Hits          24235    24205      -30     
- Misses        12671    12694      +23     
- Partials       2672     2683      +11     
Impacted Files Coverage Δ Complexity Δ
...apache/dubbo/common/extension/ExtensionLoader.java 75.17% <100.00%> (+0.23%) 0.00 <0.00> (ø)
...rg/apache/dubbo/remoting/utils/PayloadDropper.java 46.15% <0.00%> (-30.77%) 0.00% <0.00%> (ø%)
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 72.41% <0.00%> (-10.35%) 0.00% <0.00%> (ø%)
...dubbo/remoting/exchange/support/DefaultFuture.java 78.44% <0.00%> (-10.35%) 0.00% <0.00%> (ø%)
...pache/dubbo/remoting/transport/AbstractServer.java 53.75% <0.00%> (-3.75%) 0.00% <0.00%> (ø%)
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0.00%> (-3.51%) 8.00% <0.00%> (-1.00%)
...c/main/java/org/apache/dubbo/rpc/RpcException.java 80.00% <0.00%> (-3.34%) 0.00% <0.00%> (ø%)
...pache/dubbo/registry/support/AbstractRegistry.java 78.06% <0.00%> (-2.98%) 0.00% <0.00%> (ø%)
.../dubbo/remoting/transport/netty4/NettyChannel.java 66.33% <0.00%> (-1.99%) 0.00% <0.00%> (ø%)
.../exchange/support/header/HeaderExchangeServer.java 66.98% <0.00%> (-0.95%) 0.00% <0.00%> (ø%)
... and 3 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 0def3dc...daca52f. Read the comment docs.

@chickenlj chickenlj merged commit 00cdc53 into apache:master Apr 20, 2020
@quaff
Copy link
Copy Markdown

quaff commented Jun 24, 2020

这个回滚好像有点因噎废食,computeIfAbsent只有在极端情况(误用)陷入死循环,Doug Lea的修复方案也仅仅是检测到这种情况抛出IllegalStateException,这里用computeIfAbsent没有问题。

@messi612
Copy link
Copy Markdown

为啥要改,jdk那个bug不是嵌套调用了computeIfAbsent的时候才出现问题的吗?并发调用对NODE加了synchronized怎么出现死循环的,还是有其他原因?

@spilledyear
Copy link
Copy Markdown

@messi612
构造函数里面 会再次触发put

image

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.

5 participants