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

gallardot 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 f8e1be3930 Set default registry-disconnect-strategy:strategy to stop 
(#16323)
f8e1be3930 is described below

commit f8e1be39305af1890f1fb13a1e044846873dcc9b
Author: Wenjun Ruan <[email protected]>
AuthorDate: Tue Jul 16 15:35:12 2024 +0800

    Set default registry-disconnect-strategy:strategy to stop (#16323)
    
    Co-authored-by: Gallardot <[email protected]>
---
 .../java/org/apache/dolphinscheduler/server/master/MasterServer.java  | 4 ++++
 dolphinscheduler-master/src/main/resources/application.yaml           | 4 +---
 dolphinscheduler-master/src/test/resources/application.yaml           | 4 +---
 .../java/org/apache/dolphinscheduler/server/worker/WorkerServer.java  | 4 ++++
 dolphinscheduler-worker/src/main/resources/application.yaml           | 4 +---
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git 
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
 
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
index 329ecd5aea..937231a924 100644
--- 
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
+++ 
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
@@ -184,5 +184,9 @@ public class MasterServer implements IStoppable {
     @Override
     public void stop(String cause) {
         close(cause);
+
+        // make sure exit after server closed, don't call System.exit in close 
logic, will cause deadlock if close
+        // multiple times at the same time
+        System.exit(1);
     }
 }
diff --git a/dolphinscheduler-master/src/main/resources/application.yaml 
b/dolphinscheduler-master/src/main/resources/application.yaml
index 56c2de6aa8..a4ce4b8828 100644
--- a/dolphinscheduler-master/src/main/resources/application.yaml
+++ b/dolphinscheduler-master/src/main/resources/application.yaml
@@ -112,9 +112,7 @@ master:
   kill-application-when-task-failover: true
   registry-disconnect-strategy:
     # The disconnect strategy: stop, waiting
-    strategy: waiting
-    # The max waiting time to reconnect to registry if you set the strategy to 
waiting
-    max-waiting-time: 100s
+    strategy: stop
   worker-group-refresh-interval: 10s
   command-fetch-strategy:
     type: ID_SLOT_BASED
diff --git a/dolphinscheduler-master/src/test/resources/application.yaml 
b/dolphinscheduler-master/src/test/resources/application.yaml
index 67950bfcf0..570e2785a0 100644
--- a/dolphinscheduler-master/src/test/resources/application.yaml
+++ b/dolphinscheduler-master/src/test/resources/application.yaml
@@ -127,9 +127,7 @@ master:
   kill-application-when-task-failover: true
   registry-disconnect-strategy:
     # The disconnect strategy: stop, waiting
-    strategy: waiting
-    # The max waiting time to reconnect to registry if you set the strategy to 
waiting
-    max-waiting-time: 100s
+    strategy: stop
   worker-group-refresh-interval: 10s
   command-fetch-strategy:
     type: ID_SLOT_BASED
diff --git 
a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
 
b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
index a7b49fbd81..57cd3ccb91 100644
--- 
a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
+++ 
b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
@@ -146,6 +146,10 @@ public class WorkerServer implements IStoppable {
     @Override
     public void stop(String cause) {
         close(cause);
+
+        // make sure exit after server closed, don't call System.exit in close 
logic, will cause deadlock if close
+        // multiple times at the same time
+        System.exit(1);
     }
 
     public void killAllRunningTasks() {
diff --git a/dolphinscheduler-worker/src/main/resources/application.yaml 
b/dolphinscheduler-worker/src/main/resources/application.yaml
index e6434e4f9d..5cac4c29e5 100644
--- a/dolphinscheduler-worker/src/main/resources/application.yaml
+++ b/dolphinscheduler-worker/src/main/resources/application.yaml
@@ -61,9 +61,7 @@ worker:
     max-disk-usage-percentage-thresholds: 0.7
   registry-disconnect-strategy:
     # The disconnect strategy: stop, waiting
-    strategy: waiting
-    # The max waiting time to reconnect to registry if you set the strategy to 
waiting
-    max-waiting-time: 100s
+    strategy: stop
   task-execute-threads-full-policy: REJECT
   tenant-config:
     # tenant corresponds to the user of the system, which is used by the 
worker to submit the job. If system does not have this user, it will be 
automatically created after the parameter worker.tenant.auto.create is true.

Reply via email to