You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/10/25 05:53:47 UTC

[GitHub] [druid] kfaraz commented on a diff in pull request #13259: Fix two sources of SQL statement leaks.

kfaraz commented on code in PR #13259:
URL: https://github.com/apache/druid/pull/13259#discussion_r1004034050


##########
sql/src/main/java/org/apache/druid/sql/DirectStatement.java:
##########
@@ -301,6 +302,7 @@ public void cancel()
   public void close()
   {
     if (state != State.START && state != State.CLOSED) {
+      // super.close calls closeQuietly, which removes us from the sqlLifecycleManager.

Review Comment:
   Nit: should we rely on `close`/`closeQuietly` to do the right thing?
   Since we are anyway doing an explicit remove in `closeWithError`, I suppose we could do the same here too. Then we can just not override `closeQuietly`.
   
   Alternatively, 
   I think `closeWithQuietly` could be abstract and be more of a cleanup method which is called irrespective of whether closing with error or not.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org