You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "carryxyh (GitHub)" <gi...@apache.org> on 2018/11/07 09:26:54 UTC

[GitHub] [incubator-dubbo] carryxyh opened issue #2752: Optimize retry in failbackregistry

Currently our retry will start executing when the FailbackRegistry starts. We can completely retry it more regularly.

At present, we have five collections that need to be checked regularly. Why not check regularly when the collection is not empty, check and retry will continue until the collection is empty. If the collection has new elements that require retry, continue to open a task.

So we need to open up to five tasks at most, at least we can do not need to retry.

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2752: Optimize retry in failbackregistry

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
我们的终极目的是让检查和retry更加符合我们的预期,预期就是每五秒钟处理一次retry操作。
在我看来加一个队列不解决问题。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] lllichen commented on issue #2752: Optimize retry in failbackregistry

Posted by "lllichen (GitHub)" <gi...@apache.org>.
@carryxyh  是想为集合为null的时候终止线程池吗?集合添加元素的时候新生成一个线程池吗?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] lllichen commented on issue #2752: Optimize retry in failbackregistry

Posted by "lllichen (GitHub)" <gi...@apache.org>.
@carryxyh  是想当集合为null的时候终止线程池吗?集合添加元素的时候新生成一个线程池吗?还是写成订阅者模式

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh commented on issue #2752: Optimize retry in failbackregistry

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
目前我们的retry会在FailbackRegistry初始化的时候进行,我们完全可以让他更加规律的执行。

现在我们有五个集合需要定期检查。更好的方式应该是在这五个集合不为空的时候再进行我们的retry。然后在集合为空的时候再停止我们的任务,以此来解约更多的资源,对整个retry流程实现更精确的控制。

这种情况下,最多我们会有五个任务在执行,最少我们不需要任何一个检查+retry的任务(当我们五个集合都为空的时候)。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh commented on issue #2752: Optimize retry in failbackregistry

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
线程池的使用场景和这里是不符合的。也没有必要写成SUB/PUB。我上面的描述我思考了一下我觉得不是特别好。没必要对每个集合整体检查。关于这个的设计可以一起讨论一下。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] lllichen commented on issue #2752: Optimize retry in failbackregistry

Posted by "lllichen (GitHub)" <gi...@apache.org>.
加一个消费者队列,来一个消费一个如何

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh commented on issue #2752: Optimize retry in failbackregistry

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
https://github.com/apache/incubator-dubbo/pull/2763
我已经提交了一个PR,对这个优化有兴趣的可以帮忙review一下。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh closed issue #2752: Optimize retry in failbackregistry

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
[ issue closed by carryxyh ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] lllichen commented on issue #2752: Optimize retry in failbackregistry

Posted by "lllichen (GitHub)" <gi...@apache.org>.
@carryxyh  是想当集合为null的时候终止线程池吗?集合添加元素的时候新生成一个线程池吗?这样成本更高啊,还是写成订阅者模式,抛异常了自己推自己

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] lllichen commented on issue #2752: Optimize retry in failbackregistry

Posted by "lllichen (GitHub)" <gi...@apache.org>.
@carryxyh  是想当集合为null的时候终止线程池吗?集合添加元素的时候新生成一个线程池吗?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2752 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org