-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Optimize retry for FailbackRegistry. #2763
Conversation
The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control.
The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control.
Codecov Report
@@ Coverage Diff @@
## master #2763 +/- ##
==========================================
- Coverage 63.56% 63.56% -0.01%
==========================================
Files 577 583 +6
Lines 25934 25964 +30
Branches 4543 4533 -10
==========================================
+ Hits 16486 16504 +18
- Misses 7290 7292 +2
- Partials 2158 2168 +10
Continue to review full report at Codecov.
|
...stry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/retry/AbstractRetryTask.java
Show resolved
Hide resolved
...stry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/retry/AbstractRetryTask.java
Outdated
Show resolved
Hide resolved
...try/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/retry/FailedNotifiedTask.java
Outdated
Show resolved
Hide resolved
...stry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/retry/AbstractRetryTask.java
Show resolved
Hide resolved
} | ||
|
||
@Override | ||
public void run(Timeout timeout) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just override doRetry
or doRun
is enough. I think doRun is better(more general)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, I took a glance and this is the only comments I have so far. We should not re-implement run(), instead, to implement retry().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my mistake. According to the previous logic, failedNotify needs to be retried until the URL-NotifyListener key-value pair is removed.
So the logic of failedNotify is to reput to timer and retry no matter what the situation. After reading your review, I found that I can guarantee the above logic by reputing after doRetry. I will fix it as soon as possible.
} | ||
|
||
@Override | ||
public void run(Timeout timeout) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, I took a glance and this is the only comments I have so far. We should not re-implement run(), instead, to implement retry().
Optimize addXXXTask, directly return if we already have a retry task.
...try/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/retry/FailedNotifiedTask.java
Show resolved
Hide resolved
have we reached an agreement? can I merge it now? I noticed my comment has been solved. |
* Abstract retry task * Task for retry. * Fix sth. * Finish Optimize. fix ci failed. * Optimize retry for FailbackRegistry. The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control. * Optimize retry for FailbackRegistry. The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control. * Optimize logger warn's msg. * Optimize FailedNotifiedTask's run method. Optimize addXXXTask, directly return if we already have a retry task. * Optimize notify logic, just notify when the urls is not empty. * Optimize notify logic, just notify when the urls is not empty. * Optimize timer that use daemon thread.
* added dubbo-rpc-api filter documentation for issue no #2935 * wrong @see java.io.File was added, removed this version of checkins * Close all ports after tests finish (#2906) * fix testCustomExecutor (#2904) * Graceful shutdown enhancement in Spring (#2901) * Simplify the code logic of the method AbstractClusterInvoker#reselect. (#2826) * Simplify the code logic of the method AbstractClusterInvoker#reselect. * Minor modification for code style. * create AbstractRouter (#2909) * create AbstractRouter * router default method * router default method * router default method * mockinvoker * Added javadoc for dubbo-filter module dubbo github issue 2884 (#2921) * Enhance unit test (#2920) * Change Readme dubbo-sample hyperlink (#2927) * Simply TagRouter (#2924) * make telnet config work again (#2925) * Remove the log to putRandomPort when one protocol use random port (#2931) * optimize findConfigedPorts method of ServiceConfig to log only one time when userandom port * move the log to method putRandomPort * Fix DubboShutdownHook Memory Leak (#2922) * Improve UT grammar and remove unnecessary braces. (#2930) * Improve UT grammer, fix compiler warnings. * Remove unnecessary braces. * re-enable testCustomExecutor (#2917) * fix testCustomExecutor * fix ci * Fixing test-order dependency for FstObjectInputTest (#2815) * re-enable testCustomExecutor (#2913) * Resetting ExtensionLoader to remove test order dependencies in StickyTest (#2807) * optimize the RondRobinLoadBalance and MockClusterInvoker (#2932) delete unused logic and take the logger out. * [Dubbo-2864] Fix build failed with -Prelease (#2923) fixes #2864 * Fix telnet can not find method with enum type (#2803) * [dubbo-2766] fix the bug of isMatch method of InvokeTelnetHandler (#2787) * enhance org.apache.dubbo.rpc.protocol.dubbo.telnet.InvokeTelnetHandler#isMatch (#2941) * enhance isMatch * remove useless imports * [Dubbo-2766]Fix 2766 and enhance the invoke command (#2801) * add getter and setter for ServiceConfig's interfaceName property#2353 * add interfaceName to ignoreAttributeNames and change the unit test * delete the demo source code and update the unit test * unchange ServiceConfig * update unit test * update unit test * fix #2798 and enhance invoke command * Delete useless assignments (#2939) * Replace anonymous class with method reference (#2929) * Replace anonymous class with method reference * Revert changes as per @beiwei30 code review * Optimize retry for FailbackRegistry. (#2763) * Abstract retry task * Task for retry. * Fix sth. * Finish Optimize. fix ci failed. * Optimize retry for FailbackRegistry. The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control. * Optimize retry for FailbackRegistry. The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control. * Optimize logger warn's msg. * Optimize FailedNotifiedTask's run method. Optimize addXXXTask, directly return if we already have a retry task. * Optimize notify logic, just notify when the urls is not empty. * Optimize notify logic, just notify when the urls is not empty. * Optimize timer that use daemon thread. * standardize semantics of all mergers,enhance mergeFactory and testcase (#2936) * Modified to lower camel case (#2945) * Improve several map iteration (#2938) * added dubbo-rpc-api filter documentation for issue no #2935 * wrong @see java.io.File was added, removed this version of checkins
Optimize retry for FailbackRegistry.
The retry operation splits into specific operations, such as subscriptions and registrations. This approach allows for very precise retry control.
related issue:
#2752