zhangshenghang opened a new pull request, #13335:
URL: https://github.com/apache/seatunnel/pull/13335

   Yes.
   
   ## Purpose of the change
   
   Fixes #13325
   
   `PhysicalVertex.noticeTaskExecutionServiceCancel` retried the 
`CancelTaskOperation` invocation **forever** while the target member stayed in 
the cluster. The retry runs on the pipeline state-machine thread while holding 
the `SubPlan` and `PhysicalVertex` monitors (`updatePipelineState` → 
`stateProcess` → `cancel()`), so a live-but-unresponsive worker (long GC pause, 
overload) froze the whole pipeline state machine — including a user's cancel 
request — with no bound: every `updatePipelineState`, `cancelPipeline`, 
end-state callback and restore step for that pipeline queued behind the retry 
loop.
   
   ## Brief change log
   
   - `PhysicalVertex`: the cancel-notification retry is extracted into 
`noticeCancelOperationWithRetry()` and capped at `CANCEL_NOTICE_ATTEMPTS` (3) 
attempts with `Constant.OPERATION_RETRY_SLEEP` between attempts. After the cap, 
execution falls through to the already-existing local `CANCELED` marking — the 
same outcome as when the member is gone — so the state machine always makes 
progress.
   - The single send was extracted into `sendCancelOperation(Address)` so the 
bounded retry is unit-testable without a live worker.
   
   ## Verifying this change
   
   Extended `PhysicalVertexTest` (existing test class):
   
   - `shouldMarkTaskCanceledLocallyAfterBoundedCancelAttempts`: after 
`CANCEL_NOTICE_ATTEMPTS` failed sends the vertex is marked CANCELED locally and 
its completion future resolves.
   - `shouldStopRetryingOnceCancelOperationIsAccepted`: a successful first send 
stops the retry and leaves the vertex in CANCELING, waiting for the terminal 
callback from the worker.
   
   Verified with:
   
   ```
   ./mvnw -pl seatunnel-engine/seatunnel-engine-server -am install -DskipTests
   ./mvnw -pl seatunnel-engine/seatunnel-engine-server surefire:test 
-Dtest=PhysicalVertexTest
   ```
   
   I verified the fix locally.
   


-- 
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]

Reply via email to