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

caishunfeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new dce3c132ca [DS-9387][refactor]Remove the lock in the start method of 
the MasterRegistryClient class (#9389)
dce3c132ca is described below

commit dce3c132ca7b6a44dc072f9e4079e3ed1021b2f0
Author: worry <[email protected]>
AuthorDate: Fri Apr 8 21:06:28 2022 +0800

    [DS-9387][refactor]Remove the lock in the start method of the 
MasterRegistryClient class (#9389)
---
 .../server/master/registry/MasterRegistryClient.java                 | 5 -----
 1 file changed, 5 deletions(-)

diff --git 
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java
 
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java
index abf1734af4..e567b77464 100644
--- 
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java
+++ 
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java
@@ -112,10 +112,7 @@ public class MasterRegistryClient {
     }
 
     public void start() {
-        String nodeLock = 
Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_STARTUP_MASTERS;
         try {
-            // create distributed lock with the root node path of the lock 
space as /dolphinscheduler/lock/failover/startup-masters
-            registryClient.getLock(nodeLock);
             // master registry
             registry();
 
@@ -123,8 +120,6 @@ public class MasterRegistryClient {
         } catch (Exception e) {
             logger.error("master start up exception", e);
             throw new RuntimeException("master start up error", e);
-        } finally {
-            registryClient.releaseLock(nodeLock);
         }
     }
 

Reply via email to