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

This commit is contained in:
dong6349 2023-09-19 10:34:07 +08:00 committed by GitHub
parent c438d7194c
commit 298b8ccf5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

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