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-issue-2184] Fix Return the hanging client requests ASAP. when connection is broken unexpectedly. #2184 #2206

Closed

Conversation

daryl666
Copy link

@daryl666 daryl666 commented Aug 7, 2018

What is the purpose of the change

Fix Return the hanging client requests ASAP. when connection is broken unexpectedly. #2184

Brief changelog

add the configuration of heartbeat reconnect, default true, if set false, when heartbeat timeout, consumer disconnect

Verifying this change

org.apache.dubbo.common.Constants
org.apache.dubbo.remoting.exchange.support.header.HeartBeatTask

From Baiji, Term 268, Team 3, Issue #2184, Q3-5

@daryl666 daryl666 changed the title [Dubbo-remoting] Fix Return the hanging client requests ASAP. when connection is broken unexpectedly. #2184 [Dubbo-issue-2184] Fix Return the hanging client requests ASAP. when connection is broken unexpectedly. #2184 Aug 7, 2018
@codecov-io
Copy link

Codecov Report

Merging #2206 into master will decrease coverage by 0.06%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2206      +/-   ##
============================================
- Coverage     54.24%   54.18%   -0.07%     
+ Complexity     5121     5118       -3     
============================================
  Files           569      569              
  Lines         25031    25032       +1     
  Branches       4456     4456              
============================================
- Hits          13579    13563      -16     
- Misses         9415     9432      +17     
  Partials       2037     2037
Impacted Files Coverage Δ Complexity Δ
...emoting/exchange/support/header/HeartBeatTask.java 52.77% <0%> (ø) 4 <0> (ø) ⬇️
...c/main/java/org/apache/dubbo/common/Constants.java 90% <100%> (+1.11%) 1 <0> (ø) ⬇️
...che/dubbo/remoting/transport/mina/MinaChannel.java 42.25% <0%> (-11.27%) 15% <0%> (-1%)
...onfig/spring/extension/SpringExtensionFactory.java 75% <0%> (-10.72%) 10% <0%> (ø)
.../dubbo/remoting/transport/netty4/NettyChannel.java 60% <0%> (-5%) 21% <0%> (-1%)
...he/dubbo/remoting/transport/netty/NettyServer.java 67.85% <0%> (-3.58%) 8% <0%> (-1%)
...e/dubbo/remoting/transport/netty4/NettyServer.java 72.13% <0%> (-3.28%) 9% <0%> (-1%)
.../java/org/apache/dubbo/config/ReferenceConfig.java 51.41% <0%> (+0.7%) 43% <0%> (ø) ⬇️

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 e961c90...8e7411f. Read the comment docs.

@@ -70,7 +71,8 @@ public void run() {
if (lastRead != null && now - lastRead > heartbeatTimeout) {
logger.warn("Close channel " + channel
+ ", because heartbeat read idle time out: " + heartbeatTimeout + "ms");
if (channel instanceof Client) {

if (channel instanceof Client && channel.getUrl().getParameter(Constants.HEARTBEAT_RECONNECT, Constants.DEFAULT_HEARTBEAT_RECONNECT)) {
Copy link
Member

Choose a reason for hiding this comment

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

This op can not make the hanging request return directly. It just control the reconnect.
I didn't think this pr can solve this problem.
Maybe u should fix or send another pr
:)

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree. This patch didn't solve the problem

@chickenlj chickenlj closed this Aug 9, 2018
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