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/31 17:23:27 UTC

[GitHub] [druid] xvrl commented on a diff in pull request #13281: [Backport] Fix QueryContext race condition

xvrl commented on code in PR #13281:
URL: https://github.com/apache/druid/pull/13281#discussion_r1009675268


##########
sql/src/main/java/org/apache/druid/sql/avatica/DruidConnection.java:
##########
@@ -97,7 +97,7 @@ public DruidJdbcStatement createStatement(SqlStatementFactory sqlStatementFactor
       final DruidJdbcStatement statement = new DruidJdbcStatement(
           connectionId,
           statementId,
-          context,
+          context.copy(),

Review Comment:
   a comment might be useful here



##########
sql/src/main/java/org/apache/druid/sql/avatica/DruidConnection.java:
##########
@@ -127,7 +127,7 @@ public DruidJdbcPreparedStatement createPreparedStatement(
 
       @SuppressWarnings("GuardedBy")
       final PreparedStatement statement = sqlStatementFactory.preparedStatement(
-          sqlRequest.withContext(context)
+          sqlQueryPlus.withContext(context.copy())

Review Comment:
   same here



-- 
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