Cool, It seems to be a general logic, I will abstract different retry policy classes which can be reused easier
------------------ 原始邮件 ------------------ 发件人: "lgcareer2019"<[email protected]>; 发送时间: 2020年5月11日(星期一) 晚上6:56 收件人: "dev"<[email protected]>; 抄送: "GabryWu"<[email protected]>;"qiaozhanwei"<[email protected]>; 主题: Re: Re:introduce retryer for async function I also agree with it. It's better to abstract diffrent retry policy class in order to reuse easier. DolphinScheduler(Incubator) PPMC Gang Li 李岗 [email protected]<mailto:[email protected]> 发件人: GabryWu 发送时间: 2020-05-11 18:30 收件人: dev 抄送: wu_shao_jie; qiaozhanwei 主题: Re:Re: 回复:introduce retryer for async function yes,agree with you. It's better let's others know when should or not use the retryer,otherwise a retry hell reached ------------------ 原始邮件 ------------------ 发件人:&nbsp;"[email protected]" <[email protected]&gt;; 发送时间:&nbsp;2020年5月11日(星期一) 18:19 收件人:&nbsp;"dev" <[email protected]&gt;; 抄送:&nbsp;"我的QQ邮箱" <[email protected]&gt;; 主题:&nbsp;Re: 回复:introduce retryer for async function great I think it is best to encapsulate a tool class, because it needs to be called in many places, not only in ack and response ————————————— DolphinScheduler(Incubator)&nbsp; PPMC Zhanwei Qiao 乔占卫 [email protected] &nbsp; 发件人: GabryWu 发送时间: 2020-05-11 17:33 收件人: dev 抄送: 我的QQ邮箱 主题: 回复:introduce retryer for async function I created one PR: https://github.com/apache/incubator-dolphinscheduler/pull/2679 ------------------ 原始邮件 ------------------ 发件人: "GabryWu"<[email protected]&gt;; 发送时间: 2020年5月11日(星期一) 中午1:01 收件人: "dev"<[email protected]&gt;; 主题: introduce retryer for async function Now, dolphin already refactor worker ,and netty is being used. It can be predicted that async method will be more and more used ,and function retryer is necessary . If we simply call function twice or more , it's ugly and beyonds understanding So I suggest we introduce a retryer class ,for example https://github.com/rholder/guava-retrying
