You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "hutiefang76 (via GitHub)" <gi...@apache.org> on 2026/09/09 14:13:44 UTC
[PR] [Fix][Zeta] Continue lifecycle cleanup after close failure [seatunnel]
hutiefang76 opened a new pull request, #12237:
URL: https://github.com/apache/seatunnel/pull/12237
### Purpose of this pull request
Fixes #12231.
`SeaTunnelTask.close()` previously collected only `IOException`. If a lifecycle threw an unchecked exception, the stream stopped immediately and the remaining initialized lifecycles were never closed.
This change makes task teardown best-effort and ordered: every lifecycle close is attempted, the first failure is preserved, and later failures are attached as suppressed exceptions before the original failure is rethrown.
### Does this PR introduce _any_ user-facing change?
Yes. Task shutdown now attempts to release all initialized lifecycle resources even when one close operation fails. The original failure remains visible to the caller.
### How was this patch tested?
Added `SeaTunnelTaskCloseTest` covering:
- an unchecked close failure followed by another lifecycle
- multiple failures with first-failure and suppressed-failure preservation
- repeated close attempts
Verified on JDK 8 with:
```bash
./mvnw -pl seatunnel-engine/seatunnel-engine-server -am \
-Dtest=SeaTunnelTaskCloseTest \
-Dsurefire.failIfNoSpecifiedTests=false \
-DskipITs -Dskip.ui=true clean verify
```
Result: 40 reactor modules built successfully; 3 tests passed.
Also ran `./mvnw spotless:apply` successfully.
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR.
--
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][Zeta] Continue lifecycle cleanup after close failure [seatunnel]
Posted by "hutiefang76 (via GitHub)" <gi...@apache.org>.
hutiefang76 closed pull request #12237: [Fix][Zeta] Continue lifecycle cleanup after close failure
URL: https://github.com/apache/seatunnel/pull/12237
--
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][Zeta] Continue lifecycle cleanup after close failure [seatunnel]
Posted by "hutiefang76 (via GitHub)" <gi...@apache.org>.
hutiefang76 commented on PR #12237:
URL: https://github.com/apache/seatunnel/pull/12237#issuecomment-5614626579
Thanks for the detailed comparison, @DanielLeens. I checked #12235 and confirmed that it was submitted first and covers the same unchecked-close failure, including exception aggregation and repeated close calls. I missed that overlap when opening this PR; sorry for the duplicate review work.
I'm closing this PR in favor of #12235 so there is one implementation to review. The broader Error handling in this version is not necessary to fix #12231 and can be discussed separately if needed.
--
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