What is the fault tolerance process of master? (Master怎么进行容错)
Branch: dev problem: The worker sends ack and response to the master through rpc. When the master hangs up, the worker will find a master to send again. The master receives the information and writes it to the eventQueue on the one hand, and puts it in the taskCache on the other hand, but the taskCache just gets the task in a loop It’s only used when it’s status. For the new master, the task information of the previous master is not maintained. Is it because my code does not cover it or is there no retry for the process instance or task instance after the master hangs up. Thank you
分支:dev 问题: worker通过rpc向master发送ack和response,当master挂掉之后,worker会重新找一个master进行发送,master收到信息一方面写到eventQueue中,一方面放到taskCache中,但是taskCache只是在循环获取task状态的时候才会用到。对于新的 master是没有维护上一个master的任务信息的,是我代码没有覆盖到 还是目前没有做针对master挂掉后对流程实例或者任务实例的重试。谢谢
When the Master hangs up, other online Masters will receive the ZK Master node remove event to perform fault tolerance. First, they will query all the process instances that need fault tolerance on the dead Master, and then generate fault tolerance Commands and write them into the command table of the database. Then after the normal running Master obtains the lock, it gets the fault-tolerant Command in the database, starts execution, initialization, DAG construction, etc., and then finds all the head nodes. If the task status has been completed, continue to look down until the process instance is found Task node running As a result, the new Master takes over the process instance and continues to monitor the task status. After the current task node is executed, it continues to dispatch tasks
当Master 挂掉以后,其他在线的 Master 会收到 ZK Master节点 remove 事件,进行容错,首先会查询 死掉的Master 上面所有需要容错的 流程实例,然后生成容错Command,写入数据库的command表中 然后正常运行的Master 获取锁以后,到数据库中拿到容错Command,开始执行,初始化,DAG构建等,然后找出所有头结点,如果任务状态已经完成,继续向下查找,直到找到流程实例正在运行的任务节点 由此新的Master 就接管了这个流程实例,继续监控任务状态,当前任务节点执行完毕以后,继续派发任务
When the Master hangs up, other online Masters will receive the ZK Master node remove event to perform fault tolerance. First, they will query all the process instances that need fault tolerance on the dead Master, and then generate fault tolerance Commands and write them into the command table of the database. Then after the normal running Master obtains the lock, it gets the fault-tolerant Command in the database, starts execution, initialization, DAG construction, etc., and then finds all the head nodes. If the task status has been completed, continue to look down until the process instance is found Task node running As a result, the new Master takes over the process instance and continues to monitor the task status. After the current task node is executed, it continues to dispatch tasks
当Master 挂掉以后,其他在线的 Master 会收到 ZK Master节点 remove 事件,进行容错,首先会查询 死掉的Master 上面所有需要容错的 流程实例,然后生成容错Command,写入数据库的command表中 然后正常运行的Master 获取锁以后,到数据库中拿到容错Command,开始执行,初始化,DAG构建等,然后找出所有头结点,如果任务状态已经完成,继续向下查找,直到找到流程实例正在运行的任务节点 由此新的Master 就接管了这个流程实例,继续监控任务状态,当前任务节点执行完毕以后,继续派发任务
good question and answer
后正常运行的Master 获取锁以后,到数据库中拿到容错Command
当Master挂掉以后,其他在线的Master都会收到remover时间,那么生成容错Command,并且写入数据库的command表中的流程是由一个还是多个maser节点完成的? Master挂掉 他持有的锁是如何释放的?