This is an automated email from the ASF dual-hosted git repository.

chenxingchun pushed a commit to branch 1.3.6-prepare
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.6-prepare by this push:
     new 95c1f38  [1.3.6-prepare][Master] Fix First master fault tolerance when 
startup #5045 pr #5045 issue #5044
     new 7033e63  Merge pull request #5046 from CalvinKirs/1.3.6-pre-#5045
95c1f38 is described below

commit 95c1f38c2afe68e3e2c4cef87b73d7ffa1fa646b
Author: CalvinKirs <[email protected]>
AuthorDate: Sat Mar 13 00:10:00 2021 +0800

    [1.3.6-prepare][Master] Fix First master fault tolerance when startup #5045
    pr #5045
    issue #5044
---
 .../java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
index b313a1d..ae3f993 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
@@ -84,8 +84,8 @@ public class ZKMasterClient extends AbstractZKClient {
             // master registry
             masterRegistry.registry();
             
masterRegistry.getZookeeperRegistryCenter().setStoppable(masterServer);
-            String registPath = this.masterRegistry.getMasterPath();
-            
masterRegistry.getZookeeperRegistryCenter().getRegisterOperator().handleDeadServer(registPath,
 ZKNodeType.MASTER, Constants.DELETE_ZK_OP);
+            String registryPath = this.masterRegistry.getMasterPath();
+            
masterRegistry.getZookeeperRegistryCenter().getRegisterOperator().handleDeadServer(registryPath,
 ZKNodeType.MASTER, Constants.DELETE_ZK_OP);
 
             // init system znode
             this.initSystemZNode();
@@ -176,9 +176,6 @@ public class ZKMasterClient extends AbstractZKClient {
      * @throws Exception exception
      */
     private void failoverServerWhenDown(String serverHost, ZKNodeType 
zkNodeType) throws Exception {
-        if (StringUtils.isEmpty(serverHost)) {
-            return;
-        }
         switch (zkNodeType) {
             case MASTER:
                 failoverMaster(serverHost);

Reply via email to