Browse Source

Set default registry-disconnect-strategy:strategy to stop (#16323)

Co-authored-by: Gallardot <gallardot@apache.org>
dev
Wenjun Ruan 5 months ago committed by GitHub
parent
commit
f8e1be3930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
  2. 4
      dolphinscheduler-master/src/main/resources/application.yaml
  3. 4
      dolphinscheduler-master/src/test/resources/application.yaml
  4. 4
      dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
  5. 4
      dolphinscheduler-worker/src/main/resources/application.yaml

4
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java

@ -184,5 +184,9 @@ public class MasterServer implements IStoppable {
@Override @Override
public void stop(String cause) { public void stop(String cause) {
close(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);
} }
} }

4
dolphinscheduler-master/src/main/resources/application.yaml

@ -112,9 +112,7 @@ master:
kill-application-when-task-failover: true kill-application-when-task-failover: true
registry-disconnect-strategy: registry-disconnect-strategy:
# The disconnect strategy: stop, waiting # The disconnect strategy: stop, waiting
strategy: waiting strategy: stop
# The max waiting time to reconnect to registry if you set the strategy to waiting
max-waiting-time: 100s
worker-group-refresh-interval: 10s worker-group-refresh-interval: 10s
command-fetch-strategy: command-fetch-strategy:
type: ID_SLOT_BASED type: ID_SLOT_BASED

4
dolphinscheduler-master/src/test/resources/application.yaml

@ -127,9 +127,7 @@ master:
kill-application-when-task-failover: true kill-application-when-task-failover: true
registry-disconnect-strategy: registry-disconnect-strategy:
# The disconnect strategy: stop, waiting # The disconnect strategy: stop, waiting
strategy: waiting strategy: stop
# The max waiting time to reconnect to registry if you set the strategy to waiting
max-waiting-time: 100s
worker-group-refresh-interval: 10s worker-group-refresh-interval: 10s
command-fetch-strategy: command-fetch-strategy:
type: ID_SLOT_BASED type: ID_SLOT_BASED

4
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java

@ -146,6 +146,10 @@ public class WorkerServer implements IStoppable {
@Override @Override
public void stop(String cause) { public void stop(String cause) {
close(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() { public void killAllRunningTasks() {

4
dolphinscheduler-worker/src/main/resources/application.yaml

@ -61,9 +61,7 @@ worker:
max-disk-usage-percentage-thresholds: 0.7 max-disk-usage-percentage-thresholds: 0.7
registry-disconnect-strategy: registry-disconnect-strategy:
# The disconnect strategy: stop, waiting # The disconnect strategy: stop, waiting
strategy: waiting strategy: stop
# The max waiting time to reconnect to registry if you set the strategy to waiting
max-waiting-time: 100s
task-execute-threads-full-policy: REJECT task-execute-threads-full-policy: REJECT
tenant-config: 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. # 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.

Loading…
Cancel
Save