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

   ### Purpose of this pull request
   
   A user asked (via a support-bot Q&A export reviewed for documentation gaps): 
if `job.retry.times`
   is set to e.g. 5, a pipeline fails and recovers successfully 3 times, then 
runs fine for a while
   before failing again -- does the next retry attempt count as retry #1 again, 
or retry #4?
   
   Verified against `seatunnel-engine-server`'s `SubPlan.java`:
   - `pipelineRestoreNum` is a plain `AtomicInteger`, incremented only via 
`getAndIncrement()` inside
     `prepareRestorePipeline()`.
   - It is never reset anywhere else in the class -- not after a successful 
restore, not after any
     amount of subsequent healthy running time.
   - The restore-eligibility check (`needRestore()`) is 
`getPipelineRestoreNum() < pipelineMaxRestoreNum`,
     a plain cumulative comparison for the whole lifetime of that pipeline's 
`SubPlan` instance (i.e.
     the whole job run, from submission to final completion/cancellation).
   
   So the answer is: it's cumulative and never resets. With the default 
`job.retry.times = 3`, once a
   pipeline has used up all 3 retries -- even if they were spread across days 
of otherwise-healthy
   running -- the next failure is terminal. The only way to get a fresh retry 
budget is to resubmit the
   job as a new run.
   
   The existing doc for `job.retry.times` only said "Used to control the 
default retry times when a job
   fails. The default value is 3" -- it didn't address this at all, which is 
presumably why the
   cumulative/non-reset behavior keeps surprising users. Added an explicit 
explanation with a worked
   example to `docs/en/introduction/configuration/JobEnvConfig.md` and its 
`docs/zh` counterpart.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No functional change. Documentation-only addition.
   
   ### How was this patch tested?
   
   Documentation-only change, so `./mvnw spotless:apply` is a no-op (spotless 
in this repo only formats
   `<java>` and `<pom>`, not markdown). The behavioral claim was verified 
directly against current `dev`
   HEAD source, not inferred from existing docs:
   - 
`seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/SubPlan.java`
     -- traced every reference to `pipelineRestoreNum` (declaration, 
constructor init, the single
     `getAndIncrement()` call site in `prepareRestorePipeline()`, the 
`needRestore()` comparison against
     `pipelineMaxRestoreNum`, and the getter) to confirm there is no reset path.
   - 
`seatunnel-api/src/main/java/org/apache/seatunnel/api/options/EnvCommonOptions.java`
 -- confirmed
     `JOB_RETRY_TIMES` default value (3) matches the existing doc text.
   
   ### Check list
   
   * [x] No new JAR binary package is added.
   * [x] English and Chinese documentation both updated.
   * [x] No incompatible configuration or API change is introduced (docs-only).
   * [x] N/A -- documentation-only change, no test coverage 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]

Reply via email to