-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure cleanupQuery gets called for procedures #19692
Ensure cleanupQuery gets called for procedures #19692
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have an increasing number of tweaks in the procedures:
try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(getClass().getClassLoader())) { ....}
try (UncheckedCloseable ignore = () -> metadata.cleanupQuery(session)) { .... }
I'm not sure how the engineers maintaining eventually the procedure code/ writing new procedures are supposed to know about them.
Ideally they would be transparent for the the procedure developer, but i don't see a better solution currently.
lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/UncheckedCloseable.java
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/procedure/VacuumProcedure.java
Show resolved
Hide resolved
3b6397e
to
1c8646d
Compare
c0f586e
to
8f1f4b1
Compare
Ensure `cleanupQuery` is called for cases when `ConnectorMetadata` is constructed outside of typical query processing (`Connector.getMetadata`).
8f1f4b1
to
e2c3ed3
Compare
No release notes entry needed @findepi @findinpath @ebyhr ? |
|
@findinpath please try to think in end-user's terms. |
@findepi @findinpath .. so maybe we say something like "Prevent memory leak" or "Increase stability" .... or it really is not user facing enough and we decide to leave out .. one way or another.. please let me know |
I'd say that at the moment it is not user facing. |
Ensure
cleanupQuery
is called for cases whenConnectorMetadata
is constructed outside of typical query processing(
Connector.getMetadata
).