You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dolphinscheduler.apache.org by 刘坤元 <53...@qq.com> on 2020/12/30 07:27:08 UTC

[DISCUSS] Process this problem about the master loop

Dear all

1) In the current version, there is a dead loop, one second for each sleep: if the database fails, the master will always print the log. The disadvantage is that it is easy to fill up the disk. The advantage is that the service can be restored after the database is restored.


2) Allows users to set the number of consecutive database connection failures, the default value is - 1 (that is unlimited number). If the maximum number of database connection failures is reached, the master exits the service. The advantage is that the maximum number of logs can be controlled. The disadvantage is that if the number of consecutive database connection failures exceeds the maximum number of database connection failures, the master will exit and the service cannot be restored after the database is restored.





1) 目前版本,死循环,每次睡眠1秒:如果数据库挂掉,master就会一直打印日志。坏处就是容易把磁盘写满,好处是数据库恢复了就可以重新恢复服务。
2) 可以让用户设置数据库连接连续失败次数,默认是-1(就是不限制次数)。如果达到最大数据库连接失败次数,则master退出服务。这样的好处就是就可以控制日志的最大数量,
坏处就是连续连接数据库失败次数超过最大数据库连接失败次数后,master退出,数据库恢复后不能重新恢复服务。





liukunyuan

Re:[DISCUSS] Process this problem about the master loop

Posted by CalvinKirs <ac...@163.com>.
I don’t think exit is a good solution (even if you use multiple intermittent retries).

I think the original design is better. I also have a reply in this issue #4226.

When the upstream is abnormal ( The downstream is strongly dependent on the upstream), our better approach is to adopt a circuit breaker strategy instead of directly downgrading.

The original method (sleep is actually a means of circuit breakers)

The problem we need to focus on is how to reduce logs, not stop services.






Best  wishes!
CalvinKirs


On 12/30/2020 15:27,刘坤元<53...@qq.com> wrote:
Dear all

1) In the current version, there is a dead loop, one second for each sleep: if the database fails, the master will always print the log. The disadvantage is that it is easy to fill up the disk. The advantage is that the service can be restored after the database is restored.


2) Allows users to set the number of consecutive database connection failures, the default value is - 1 (that is unlimited number). If the maximum number of database connection failures is reached, the master exits the service. The advantage is that the maximum number of logs can be controlled. The disadvantage is that if the number of consecutive database connection failures exceeds the maximum number of database connection failures, the master will exit and the service cannot be restored after the database is restored.





1) 目前版本,死循环,每次睡眠1秒:如果数据库挂掉,master就会一直打印日志。坏处就是容易把磁盘写满,好处是数据库恢复了就可以重新恢复服务。
2) 可以让用户设置数据库连接连续失败次数,默认是-1(就是不限制次数)。如果达到最大数据库连接失败次数,则master退出服务。这样的好处就是就可以控制日志的最大数量,
坏处就是连续连接数据库失败次数超过最大数据库连接失败次数后,master退出,数据库恢复后不能重新恢复服务。





liukunyuan

Re: [DISCUSS] Process this problem about the master loop

Posted by leon bao <le...@apache.org>.
-If the database fails, the master will print the log all the time

This is really unreasonable.
If we can solve the problem of logging all the time, is there no need to
quit?

lidong dai <da...@gmail.com> 于2020年12月30日周三 下午8:56写道:

> I think what you said is better choice
>
>
> Best Regards
> ---------------
> DolphinScheduler(Incubator) PPMC
> Lidong Dai 代立冬
> dailidong66@gmail.com
> ---------------
>
>
> On Wed, Dec 30, 2020 at 3:27 PM 刘坤元 <53...@qq.com> wrote:
>
> > Dear all
> >
> > 1) In the current version, there is a dead loop, one second for each
> > sleep: if the database fails, the master will always print the log. The
> > disadvantage is that it is easy to fill up the disk. The advantage is
> that
> > the service can be restored after the database is restored.
> >
> >
> > 2) Allows users to set the number of consecutive database connection
> > failures, the default value is - 1 (that is unlimited number). If the
> > maximum number of database connection failures is reached, the master
> exits
> > the service. The advantage is that the maximum number of logs can be
> > controlled. The disadvantage is that if the number of consecutive
> database
> > connection failures exceeds the maximum number of database connection
> > failures, the master will exit and the service cannot be restored after
> the
> > database is restored.
> >
> >
> >
> >
> >
> > 1) 目前版本,死循环,每次睡眠1秒:如果数据库挂掉,master就会一直打印日志。坏处就是容易把磁盘写满,好处是数据库恢复了就可以重新恢复服务。
> > 2)
> >
> 可以让用户设置数据库连接连续失败次数,默认是-1(就是不限制次数)。如果达到最大数据库连接失败次数,则master退出服务。这样的好处就是就可以控制日志的最大数量,
> > 坏处就是连续连接数据库失败次数超过最大数据库连接失败次数后,master退出,数据库恢复后不能重新恢复服务。
> >
> >
> >
> >
> >
> > liukunyuan
>


-- 
DolphinScheduler(Incubator)  PPMC
BaoLiang 鲍亮
leonbao@apache.org

Re: [DISCUSS] Process this problem about the master loop

Posted by lidong dai <da...@gmail.com>.
I think what you said is better choice


Best Regards
---------------
DolphinScheduler(Incubator) PPMC
Lidong Dai 代立冬
dailidong66@gmail.com
---------------


On Wed, Dec 30, 2020 at 3:27 PM 刘坤元 <53...@qq.com> wrote:

> Dear all
>
> 1) In the current version, there is a dead loop, one second for each
> sleep: if the database fails, the master will always print the log. The
> disadvantage is that it is easy to fill up the disk. The advantage is that
> the service can be restored after the database is restored.
>
>
> 2) Allows users to set the number of consecutive database connection
> failures, the default value is - 1 (that is unlimited number). If the
> maximum number of database connection failures is reached, the master exits
> the service. The advantage is that the maximum number of logs can be
> controlled. The disadvantage is that if the number of consecutive database
> connection failures exceeds the maximum number of database connection
> failures, the master will exit and the service cannot be restored after the
> database is restored.
>
>
>
>
>
> 1) 目前版本,死循环,每次睡眠1秒:如果数据库挂掉,master就会一直打印日志。坏处就是容易把磁盘写满,好处是数据库恢复了就可以重新恢复服务。
> 2)
> 可以让用户设置数据库连接连续失败次数,默认是-1(就是不限制次数)。如果达到最大数据库连接失败次数,则master退出服务。这样的好处就是就可以控制日志的最大数量,
> 坏处就是连续连接数据库失败次数超过最大数据库连接失败次数后,master退出,数据库恢复后不能重新恢复服务。
>
>
>
>
>
> liukunyuan