dongjoon-hyun commented on a change in pull request #28870:
URL: https://github.com/apache/spark/pull/28870#discussion_r443061776
##########
File path:
sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
##########
@@ -170,24 +176,35 @@ public void run() {
session.closeExpiredOperations();
}
}
+ sleepFor(interval);
}
}
- private void sleepInterval(long interval) {
- try {
- Thread.sleep(interval);
- } catch (InterruptedException e) {
- // ignore
+ private void sleepFor(long interval) {
+ synchronized (timeoutCheckerLock) {
+ try {
+ timeoutCheckerLock.wait(interval);
+ } catch (InterruptedException e) {
+ // Ignore, and break.
+ }
}
}
};
backgroundOperationPool.execute(timeoutChecker);
}
+ private void shutdownTimeoutChecker() {
+ shutdown = true;
+ synchronized (timeoutCheckerLock) {
+ timeoutCheckerLock.notify();
+ }
+ }
+
@Override
public synchronized void stop() {
super.stop();
shutdown = true;
Review comment:
This should be removed because we did it in `shutdownTimeoutChecker`
function.
HIVE-14817 removed this, too.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]