Open famod opened 1 year ago
To be more precise:
This is highly questionable in environments that report such leaks
Agroal in Quarkus actually auto-closes the Statement
after issuing the warning, so it shields the user from actual leaks piling up.
So in fact this issue is more severe in environments that do not offer such a safeguard!
The warning in Quarkus is annoying still.
Environment
Liquibase Version: 4.13.0
Liquibase Integration & Version: Quarkus 2.11.1.Final
Liquibase Extension(s) & Version: -
Database Vendor & Version: MariaDB 10.6.8
Operating System Type & Version: not relevant
Infrastructure Type/Provider: not relevant
Description
2914 introduced a
PreparedStatement
leak, apparently on purpose: https://github.com/liquibase/liquibase/pull/2914/files#diff-b378dd1eeb35b9dbe8751bd7462c9aad1b1c8c74d6cd5fd6c64b4014d05a1260R53This is highly questionable in environments that report such leaks, e.g. Quarkus with Agroal (actually not a good practice at all, IMO):
Steps To Reproduce
Should be pretty obvious but if required I can adjust the Quarkus
liquibase-quickstart
.Actual Behavior
Statement is not closed when
Liquibase
instance is closed.Expected/Desired Behavior
All "resources", including any
PreparedStatements
etc., are properly closed when closing theLiquibase
instance.Screenshots (if appropriate)
n/a
Additional Context
https://github.com/quarkusio/quarkus/issues/26995