goutamadwant opened a new pull request, #11812:
URL: https://github.com/apache/seatunnel/pull/11812
### Purpose of this pull request
Fixes #11808.
`TaskExecutionService.deployTask` acquires one classloader reference for
each task before the task group is published. If a later task fails during jar
resolution, classloader creation, or deserialization, those earlier references
were not released.
This change tracks only the references acquired by the current deployment
attempt and releases them in reverse order when construction fails. The
deployment exception remains the primary failure, and cleanup failures are
attached as suppressed exceptions while cleanup continues.
The normal classloader lifecycle for a successfully published
`TaskGroupContext` is unchanged.
### Does this PR introduce _any_ user-facing change?
No. This changes internal Zeta task deployment cleanup only.
### How was this patch tested?
Added a regression test with one valid task followed by an invalid
serialized task. Before the fix, the failed deployment left two classloader
references. After the fix, the reference count returns to zero and no task
group context is published.
Verified with:
```shell
./mvnw -pl seatunnel-engine/seatunnel-engine-server \
-Dtest=TaskExecutionServiceTest#testDeployTaskReleasesClassLoadersWhenDeserializationFails
test
./mvnw -pl seatunnel-engine/seatunnel-engine-server \
-Dtest=TaskExecutionServiceTest test
./mvnw -pl seatunnel-engine/seatunnel-engine-server package
```
The module package completed with 381 tests passing and 5 skipped.
### Check list
* [x] No new Jar binary package is added, so no License Notice update is
required.
* [x] No documentation update is required because this is internal cleanup
behavior.
* [x] No incompatible change is introduced.
* [x] This does not change connector packaging or configuration.
--
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]