AMashenkov commented on code in PR #2785:
URL: https://github.com/apache/ignite-3/pull/2785#discussion_r1381418330


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/api/IgniteSqlImpl.java:
##########
@@ -54,7 +82,7 @@ public Session createSession() {
     /** {@inheritDoc} */
     @Override
     public SessionBuilder sessionBuilder() {
-        return new SessionBuilderImpl(qryProc, transactions, new HashMap<>());
+        return new SessionBuilderImpl(sessions, qryProc, transactions, new 
HashMap<>());

Review Comment:
   You pass sessions collection to SessionBuilderImpl, which leaks to the user 
side.
   SessionBuilderImpl has no locks/flags that prevents putting data into 
collections, when node is stopping. After executor will be stopped, noone will 
cleanup the collection.
   
   Maybe, we can pass a callback method reference (e.g.  `onSessionCreate()`) 
and do all stuff in the method, but outside the builder?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to