deniskuzZ commented on code in PR #6412:
URL: https://github.com/apache/hive/pull/6412#discussion_r3458203035


##########
jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java:
##########
@@ -163,6 +166,14 @@
  */
 public class HiveConnection implements java.sql.Connection {
   private static final Logger LOG = 
LoggerFactory.getLogger(HiveConnection.class);
+
+  /**
+   * Last effective {@code hive.query.timeout.seconds} in seconds, or {@code 
-1} if not yet set.
+   * Seeded from the JDBC URL at connect time; a JDBC {@link 
java.sql.Connection} may be shared
+   * across threads with concurrent {@link 
org.apache.hive.jdbc.HiveStatement}s on one HS2 session,
+   * so this field uses an {@link AtomicLong} to keep updates well-defined.
+   */
+  private final AtomicLong sessionQueryTimeoutSeconds = new AtomicLong(-1L);

Review Comment:
   volatile is not enough 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: [email protected]

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


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

Reply via email to