From 298b8ccf5a263e875568ce124b765b4789fa8061 Mon Sep 17 00:00:00 2001 From: dong6349 Date: Tue, 19 Sep 2023 10:34:07 +0800 Subject: [PATCH] Fix the ephemeralId will not be deleted before jdbc-registry closed. (#14936) --- .../plugin/registry/jdbc/task/EphemeralDateManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/task/EphemeralDateManager.java b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/task/EphemeralDateManager.java index 02ef476240..64915e8ca8 100644 --- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/task/EphemeralDateManager.java +++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/task/EphemeralDateManager.java @@ -83,12 +83,12 @@ public class EphemeralDateManager implements AutoCloseable { @Override public void close() throws SQLException { - ephemeralDateIds.clear(); - connectionListeners.clear(); - scheduledExecutorService.shutdownNow(); for (Long ephemeralDateId : ephemeralDateIds) { jdbcOperator.deleteDataById(ephemeralDateId); } + ephemeralDateIds.clear(); + connectionListeners.clear(); + scheduledExecutorService.shutdownNow(); } // Use this task to refresh ephemeral term and check the connect state.