DanielLeens opened a new pull request, #12151: URL: https://github.com/apache/seatunnel/pull/12151
### Purpose of this pull request Oracle CDC owns its active LogMiner connection inside `OracleRedoLogFetchTask.execute()`, and that connection is closed by try-with-resources after the fetch task exits. During cancellation, however, the outer `SplitFetcher` only invoked `SplitReader.wakeUp()`. `IncrementalSourceSplitReader.wakeUp()` is empty, so a fetch blocked in the CDC queue poll or in the shared output queue could prevent `splitReader.close()` from running and delay Oracle task shutdown and LogMiner connection cleanup. This change records the thread only while it executes the normal fetch task and interrupts that thread during shutdown. It suppresses only cancellation exceptions whose cause chain contains `InterruptedException`, preserves all other failures, and clears the cancellation interrupt before `splitReader.close()` so child-reader cleanup can wait normally. Cause-chain inspection is cycle-safe. Normal split assignment still uses the existing `wakeUp()` path and is not interrupted. Oracle LogMiner session reuse and the existing explicit `DBMS_LOGMNR.END_LOGMNR` call used for session rotation are unchanged. ### Does this PR introduce _any_ user-facing change? Yes. Canceling a source with an interruptible blocked fetch can now proceed to reader cleanup promptly instead of waiting for the blocked fetch to return on its own. This changes no configuration, API, state format, or normal record-processing behavior. ### How was this patch tested? Added nine focused unit tests covering: - manager-level cancellation of a blocked fetch and reader cleanup; - ordinary `addSplits` wake-up behavior and record preservation; - shutdown while the output queue is full; - residual interrupt clearing before cleanup; - late shutdown during reader close; - shutdown before fetcher start and idle shutdown; - unexpected interruption and non-cancellation failure propagation; - cyclic exception cause chains. Local checks completed: ```shell ./mvnw -pl seatunnel-connectors-v2/connector-common spotless:apply -nsu -Dmaven.gitcommitid.skip=true ./mvnw -pl seatunnel-connectors-v2/connector-common spotless:check -nsu -Dmaven.gitcommitid.skip=true git diff --cached --check ``` Local compilation and test execution were not run; the current PR-head GitHub CI is the execution authority for this SeaTunnel worktree. ### Check list * [x] No new Jar binary package is added. * [x] Documentation is not required because there is no new configuration or user contract. * [x] `incompatible-changes.md` is not required because the change is backward compatible. * [x] Connector registration and packaging files are not affected. -- 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]
