nielifeng opened a new pull request, #11565:
URL: https://github.com/apache/seatunnel/pull/11565
### Purpose of this pull request
Fixes #11563.
During Worker recovery, `CheckpointCoordinator.isNoErrorCompleted()` can
have a
non-null final `latestCompletedCheckpoint` after the corresponding
coordinator
state entry has already been cleaned. The method currently invokes
`status.equals(...)` on the nullable IMap result and fails pipeline restore
with
a `NullPointerException`.
This patch uses constant-side enum equality. A missing state is therefore
treated as not completed and the existing restore path continues. Behavior
for
the `FINISHED`, `SUSPEND`, and other non-null states remains unchanged.
### Does this PR introduce _any_ user-facing change?
Yes. A Worker restart no longer fails an affected batch pipeline solely
because
its checkpoint coordinator state entry has already been cleaned. There is no
public API, persistence format, or configuration change.
### How was this patch tested?
Added a regression that constructs a coordinator with a final completed
checkpoint and a missing state-map entry, then verifies
`isNoErrorCompleted()` returns `false` instead of throwing.
```shell
./mvnw -o -pl seatunnel-engine/seatunnel-engine-server \
-Dtest=CheckpointCoordinatorTest test
```
Result on the latest `dev` branch: 14 tests passed, 0 failures, 0 errors.
The original fault was observed during controlled Worker recovery. The
minimal
fix has not yet been revalidated with another cluster fault injection; the
unit
regression directly covers the null-state failure boundary.
### Check list
* [x] No new Jar binary package is added.
* [x] Documentation is not required because there is no new feature or user
configuration.
* [x] No incompatible change is introduced.
* [x] Connector-specific checklist items are not applicable.
--
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]