wombatu-kun commented on code in PR #19334:
URL: https://github.com/apache/hudi/pull/19334#discussion_r3626886523
##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/transaction/lock/HiveMetastoreBasedLockProvider.java:
##########
@@ -167,9 +167,12 @@ public void close() {
future.cancel(false);
}
Hive.closeCurrent();
- executor.shutdown();
} catch (Exception e) {
-
log.error(generateLogStatement(org.apache.hudi.common.lock.LockState.FAILED_TO_RELEASE,
generateLogSuffixString()));
+
log.error(generateLogStatement(org.apache.hudi.common.lock.LockState.FAILED_TO_RELEASE,
generateLogSuffixString()), e);
+ } finally {
+ // Always release the heartbeat thread pool, even if unlock/closeCurrent
above threw,
+ // otherwise the 2 scheduled threads leak for the lifetime of the JVM.
Review Comment:
Done cc04e25c65b15af105188f5d6cf5058d47f26f2e
--
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]