Skip to content

Commit

Permalink
[bugfix][cdc-base] Fix cdc base shutdown thread not cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
ic4y committed Mar 13, 2023
1 parent daa9b4f commit ef4384b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ public void close() {
}
if (executorService != null) {
executorService.shutdown();
if (executorService.awaitTermination(
if (!executorService.awaitTermination(
READER_CLOSE_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
log.warn(
"Failed to close the scan fetcher in {} seconds.",
"Failed to close the scan fetcher in {} seconds. will execute force close(ExecutorService.shutdownNow)",
READER_CLOSE_TIMEOUT_SECONDS);
executorService.shutdownNow();
}
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ public void close() {
if (!executorService.awaitTermination(
READER_CLOSE_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
log.warn(
"Failed to close the stream fetcher in {} seconds.",
"Failed to close the stream fetcher in {} seconds. will execute force close(ExecutorService.shutdownNow)",
READER_CLOSE_TIMEOUT_SECONDS);
executorService.shutdownNow();
}
}
} catch (Exception e) {
Expand Down

0 comments on commit ef4384b

Please sign in to comment.