gianm commented on a change in pull request #6868: Fix deadlock in
DruidStatement & DruidConnection
URL: https://github.com/apache/incubator-druid/pull/6868#discussion_r251254276
##########
File path: sql/src/main/java/org/apache/druid/sql/avatica/DruidConnection.java
##########
@@ -53,25 +54,29 @@
private final AtomicInteger statementCounter = new AtomicInteger();
private final AtomicReference<Future<?>> timeoutFuture = new
AtomicReference<>();
- @GuardedBy("statements")
- private final Map<Integer, DruidStatement> statements;
+ // Typically synchronized by connectionLock, except in one case: the onClose
function passed
+ // into DruidStatements contained by the map.
+ private final ConcurrentMap<Integer, DruidStatement> statements;
- @GuardedBy("statements")
+ @GuardedBy("connectionLock")
Review comment:
Ah, I see what you mean now @asdf2014 -- your patch #6903 looks good, thanks!
----------------------------------------------------------------
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]