imRYiUK commented on PR #13334:
URL: https://github.com/apache/seatunnel/pull/13334#issuecomment-7033972244

   @SEZ9 thanks for the thorough review, and for catching that 
`checkTaskGroupIsExecuting` has a third caller 
(`noticeTaskExecutionServiceCancel`, via `cancel()` and `forceStop()`). I 
missed that, and the PR description only covers the failover path.
   
   Plan for the next commits, keeping the change inside `PhysicalVertex` and 
focused on the failover path from #13320:
   
   1. **Scope the retry to failover only (issues 2, 3).** `initStateFuture` 
gets the retrying probe. The cancel and `forceStop` path keeps the previous 
single-shot behavior, so no retry sleeps run under the vertex monitor there. 
The cancel-path conflation of "probe failed" with "not executing" predates this 
PR, and I'd rather handle it separately, for example with a tri-state result in 
a follow-up. Let me know if you'd prefer it in this PR.
   2. **Interrupt (issue 1).** On interrupt during the failover probe, restore 
the flag and leave the vertex state untouched instead of moving it to FAILING.
   3. **Bounded waiting (issue 4).** Use `invoke.get(timeout, unit)` with an 
explicit bound, treat `TimeoutException` as a failed probe, and skip the sleep 
after the last attempt.
   4. **Exceptions and logging (issues 5, 8).** Narrow the catch so only an 
exhausted `ExecutionException` retry becomes `false` and other runtime 
exceptions propagate as before. Log each failed attempt at WARN with the worker 
address, task group and cause.
   5. **Javadoc (issue 6).** Describe the return contract and the callers, and 
drop the interrupt sentence if nothing observes it.
   6. **Tests (issue 7).** Make the retry sleep overridable for tests, and add 
cases that go through `initStateFuture`: stays RUNNING after a 
failed-then-successful probe, moves to FAILING after all attempts fail, and the 
worker leaving the member list between attempts.
   
   I'll also state in the PR description that this is only validated with mocks 
and unit tests, with no real failover run yet.
   
   If this plan works for you, I'll push the changes. If you'd rather keep the 
cancel path in scope, tell me and I'll adjust.


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