You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/09/06 15:02:17 UTC
[PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
Posted by "davidzollo (via GitHub) via commits" <co...@seatunnel.apache.org>.
davidzollo merged PR #12151:
URL: https://github.com/apache/seatunnel/pull/12151
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12151:
URL: https://github.com/apache/seatunnel/pull/12151#issuecomment-6538174541
Synced `dev` (3ac2d1cec6a) into this branch as de726a07c59 to pick up the current CI matrix and the merged upstream fixes. Plain merge commit, no conflicts; the diff against `dev` is still the same three files (`SplitFetcher.java`, `SplitFetcherTest.java`, `OracleCDCIT.java`). Compile and tests are left to the fork Build run per the validation policy: https://github.com/DanielLeens/seatunnel/actions/runs/41162750850
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12151:
URL: https://github.com/apache/seatunnel/pull/12151#issuecomment-5717371187
Pushed `5209460`: adds `SplitFetcherTest#cooperativeWakeUpReaderShutdownIsNotMisreportedAsFailure`, closing the Kafka/Fluss audit gap from the last self-review. It models a reader whose `fetch()` already catches its own cooperative wakeup signal and returns normally (matching `KafkaPartitionSplitReader`/`FlussSourceSplitReader`), and asserts the added `fetchingThread.interrupt()` doesn't turn that ordinary shutdown into a spurious error or leak a residual interrupt into `close()`. PR description updated to name Kafka/Fluss explicitly and explain why the lock-guarded ordering makes this safe.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12151:
URL: https://github.com/apache/seatunnel/pull/12151#issuecomment-7137309708
Thanks @davidzollo for the independent approval! I checked the current head `de726a07c592ebb565218d467c5acb3f5bc7dce8`: the reported Apache checks and exact-head fork Build are successful. Your approval is recorded separately from Daniel's earlier source assessment; I am the author here, so I am not adding a self-approval.
This also supersedes the earlier missing Apache check-adoption description; Build is now reported on the PR.
No new source finding or CI retry is requested. The branch's behind/diverged fact remains recorded independently; GitHub currently reports `UNSTABLE` with reviewDecision `APPROVED`, so I am not treating the approval alone as a merge or production-acceptance result.
This replies to the new approval on an already reviewed, unchanged head. No new full source review or local runtime validation is claimed.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12151:
URL: https://github.com/apache/seatunnel/pull/12151#issuecomment-6646613540
The CI fact cited previously has changed: exact-head fork Build 41162750850 is now successful. The earlier MongoDB unit failure and cancelled LocalFile-lane retry instructions are obsolete. My source conclusion remains clear. Apache still reports no adopted check on this head, so check adoption and independent maintainer review remain separate actions; no further source change or sync is requested. As the author I cannot independently approve this PR.
This is an unchanged-head CI/merge clarification, not another full source review. No local runtime testing was performed. Daniel has READ permission; effective maintainer approval/dismissal remains separate.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Unblock split fetcher shutdown [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12151:
URL: https://github.com/apache/seatunnel/pull/12151#issuecomment-6557778113
The CI fact in my [existing full review of this exact head](https://github.com/apache/seatunnel/pull/12151#pullrequestreview-5721287540) has changed. That source review is already published; this is a gate clarification, not another full source review on the same version.
Source status: the existing review found no blocking source issue. Its non-blocking suggestions are unchanged.
The [exact-head fork Build](https://github.com/DanielLeens/seatunnel/actions/runs/41162750850) is now `completed` / `failure`, attempt 1. Job conclusions: success=62, failure=1, cancelled=1, skipped=23. The failed [unit-test / JDK11 Ubuntu](https://github.com/DanielLeens/seatunnel/actions/runs/41162750850/job/124439626205) reports MongodbScanFetchTaskTest.shouldSkipBackfillInNonExactlyOnceMode[1]: expected3 events, got0 from a single queue.poll. That fixture invokes MongodbScanFetchTask.execute directly, without SplitFetcher, so it does not execute this PR's changed shutdown path. Both MongoDB task and test are unchanged in latest dev; no matching upstream fix is established. Investigate the produced events/queue polling if the failure repeats; do not change SplitFetcher merely to chase that unrelated fixture. The LocalFile JDK17 lane was also cancelled. Check for an active attempt, then retry only the failed/cancelled lanes still required.
The current base comparison is recorded separately. Missing Apache check adoption is distinct from the fork conclusion, and neither is an effective independent approval. Daniel is the author and has READ repository permission.
Checked 2026-11-01T12:13:09.574002+00:00; unchanged head `de726a07c592ebb565218d467c5acb3f5bc7dce8`, base `dev`; compare `diverged`, ahead 5 / behind 9; merge `blocked` / `BLOCKED`; review decision `REVIEW_REQUIRED`. Behind/diverged is recorded independently and does not itself request a sync. Daniel has READ repository permission.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org