Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Cleaning up threadlocals to prevent (small) memory leak
Closes #43759

Signed-off-by: Alexander Schwartz <[email protected]>
  • Loading branch information
ahus1 committed Oct 28, 2025
commit d72b48f247484c4157309a8327e946bf04adf516
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ protected Status validateSynch(final Connection connection, final String default
}
} catch (LiquibaseException e) {
throw new RuntimeException("Failed to validate database", e);
} finally {
ThreadLocalSessionContext.removeCurrentSession();
}

return Status.VALID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ public Status validate(Connection connection, String defaultSchema) {
}
} catch (LiquibaseException e) {
throw new RuntimeException("Failed to validate database", e);
} finally {
ThreadLocalSessionContext.removeCurrentSession();
}

return Status.VALID;
Expand Down
Loading