huagetai commented on code in PR #9281:
URL: https://github.com/apache/dolphinscheduler/pull/9281#discussion_r846532276


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java:
##########
@@ -158,10 +154,7 @@ public void removeMasterNodePath(String path, NodeType 
nodeType, boolean failove
             return;
         }
 
-        String failoverPath = getFailoverLockPath(nodeType, serverHost);

Review Comment:
   The lock is moved to the failoverMasterWithLock method of FailoverService.
   ```java
   private void failoverMasterWithLock(String masterHost) {
           String failoverPath = getFailoverLockPath(NodeType.MASTER, 
masterHost);
           try {
               registryClient.getLock(failoverPath);
               this.failoverMaster(masterHost);
           } catch (Exception e) {
               LOGGER.error("{} server failover failed, host:{}", 
NodeType.MASTER, masterHost, e);
           } finally {
               registryClient.releaseLock(failoverPath);
           }
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to