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

HashedWheelTimer #1973

Merged
merged 2 commits into from
Aug 21, 2018
Merged

HashedWheelTimer #1973

merged 2 commits into from
Aug 21, 2018

Conversation

carryxyh
Copy link
Member

HashedWheelTimer to check timeout future
The class about HashedWheelTimer is from netty which with header like :

/*
 * Copyright 2012 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

It will decrease circulate times compared to the old way.

@codecov-io
Copy link

codecov-io commented Jun 21, 2018

Codecov Report

Merging #1973 into master will increase coverage by 0.17%.
The diff coverage is 50.64%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1973      +/-   ##
============================================
+ Coverage     50.04%   50.22%   +0.17%     
- Complexity     4707     4746      +39     
============================================
  Files           562      563       +1     
  Lines         25213    25506     +293     
  Branches       4449     4508      +59     
============================================
+ Hits          12618    12810     +192     
- Misses        10688    10739      +51     
- Partials       1907     1957      +50
Impacted Files Coverage Δ Complexity Δ
...exchange/support/header/HeaderExchangeChannel.java 16.48% <0%> (ø) 6 <0> (ø) ⬇️
...ava/org/apache/dubbo/common/utils/StringUtils.java 81.59% <0%> (-2.36%) 113 <0> (ø)
...rg/apache/dubbo/common/timer/HashedWheelTimer.java 49.3% <49.3%> (ø) 16 <16> (?)
...dubbo/remoting/exchange/support/DefaultFuture.java 47.82% <94.44%> (+40.57%) 24 <2> (+22) ⬆️
...onfig/spring/extension/SpringExtensionFactory.java 73.07% <0%> (-11.54%) 8% <0%> (ø)
...e/dubbo/remoting/transport/netty/NettyChannel.java 57.5% <0%> (-8.75%) 19% <0%> (-2%)
...he/dubbo/remoting/transport/netty/NettyClient.java 72.88% <0%> (-8.48%) 12% <0%> (-1%)
...rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java 51.89% <0%> (-3.8%) 11% <0%> (-2%)
...bo/remoting/transport/netty/NettyCodecAdapter.java 53.12% <0%> (-1.57%) 3% <0%> (ø)
... and 6 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 705bf37...8ef5038. Read the comment docs.

@carryxyh
Copy link
Member Author

ISSUE:
#1371

@chickenlj chickenlj added this to the 2.7.0 milestone Jul 9, 2018
@@ -718,4 +720,16 @@ public static String toArgumentString(Object[] args) {
}
return buf.toString();
}

public static String simpleClassName(Class<?> clazz) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add a class Named ClassUtils or use org.apache.commons.lang3.ClassUtils.

Copy link
Member

Choose a reason for hiding this comment

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

suggest to move this into org.apache.dubbo.common.utils.ClassHelper

}
String className = clazz.getName();
final int lastDotIdx = className.lastIndexOf(PACKAGE_SEPARATOR_CHAR);
if (lastDotIdx > -1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

may be a innnerClass

@cvictory
Copy link
Contributor

@carryxyh I have add some comment while I review your code. Please check it.

@carryxyh
Copy link
Member Author

@cvictory
Ok, will check and fix it soon.

@beiwei30 beiwei30 merged commit 9c8f4e7 into apache:master Aug 21, 2018
zzzzhougit pushed a commit to zzzzhougit/incubator-dubbo that referenced this pull request Aug 21, 2018
* * HashedWheelTimer to check timeout future

* when the future is done, do not set it is timeout
@carryxyh carryxyh deleted the hasedwheel branch August 23, 2018 08:45
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