TaoZex commented on code in PR #4327:
URL:
https://github.com/apache/incubator-seatunnel/pull/4327#discussion_r1133648215
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/external/IncrementalSourceStreamFetcher.java:
##########
@@ -121,13 +121,17 @@ private void checkReadException() {
@Override
public void close() {
try {
+ if (streamFetchTask != null) {
+ streamFetchTask.shutdown();
+ }
if (executorService != null) {
executorService.shutdown();
- if (executorService.awaitTermination(
+ 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)",
Review Comment:
```suggestion
"Failed to close the stream fetcher in {}
seconds. Service will execute force close(ExecutorService.shutdownNow)",
```
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/external/IncrementalSourceScanFetcher.java:
##########
@@ -192,13 +192,17 @@ private void checkReadException() {
@Override
public void close() {
try {
+ if (snapshotSplitReadTask != null) {
+ snapshotSplitReadTask.shutdown();
+ }
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)",
Review Comment:
```suggestion
"Failed to close the scan fetcher in {} seconds.
Service will execute force close(ExecutorService.shutdownNow)",
```
--
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]