Browse Source

Fix the ephemeralId will not be deleted before jdbc-registry closed. (#14936)

3.2.1-prepare
dong6349 1 year ago committed by GitHub
parent
commit
298b8ccf5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/task/EphemeralDateManager.java

6
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.

Loading…
Cancel
Save