danny0405 commented on a change in pull request #4252:
URL: https://github.com/apache/hudi/pull/4252#discussion_r765464342
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/async/HoodieAsyncService.java
##########
@@ -141,35 +140,17 @@ public void start(Function<Boolean, Boolean>
onShutdownCallback) {
protected abstract Pair<CompletableFuture, ExecutorService> startService();
/**
- * A monitor thread is started which would trigger a callback if the service
is shutdown.
+ * Add shutdown callback for the completable future.
*
- * @param onShutdownCallback
+ * @param callback The callback
*/
- private void monitorThreads(Function<Boolean, Boolean> onShutdownCallback) {
- LOG.info("Submitting monitor thread !!");
- Executors.newSingleThreadExecutor(r -> {
- Thread t = new Thread(r, "Monitor Thread");
- t.setDaemon(isRunInDaemonMode());
Review comment:
Here the code new a thread pool but never shut down it, the core working
thread always lives there thus leak ~
--
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]