gianm commented on a change in pull request #6868: Fix deadlock in 
DruidStatement & DruidConnection
URL: https://github.com/apache/incubator-druid/pull/6868#discussion_r248476120
 
 

 ##########
 File path: sql/src/main/java/org/apache/druid/sql/avatica/DruidConnection.java
 ##########
 @@ -96,10 +100,9 @@ public DruidStatement createStatement(SqlLifecycleFactory 
sqlLifecycleFactory)
           sqlLifecycleFactory.factorize(),
           () -> {
             // onClose function for the statement
-            synchronized (statements) {
-              log.debug("Connection[%s] closed statement[%s].", connectionId, 
statementId);
-              statements.remove(statementId);
-            }
+            log.debug("Connection[%s] closed statement[%s].", connectionId, 
statementId);
+            // statements will be accessed unsynchronized to aviod deadlock
 
 Review comment:
   avoid (spelling)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to