SEZ9 commented on PR #12156: URL: https://github.com/apache/seatunnel/pull/12156#issuecomment-7050805510
Thanks for the updates on this PR. Here is where the four earlier points stand at head `5372e2f844820c51d58b49e3e5d7f75b7c124d38`. **Resolved** - **Guard-test guidance:** the explanation of what to do when the guard test fails is now in place at JobStatusTest.java:42-49. - **`NOT_STARTED_STATUSES` Javadoc:** the lifecycle/compatibility Javadoc is now at PhysicalPlan.java:54-64. **Still open** - **Second read in `cancelJob()`:** the not-started check still does its own state read at line 225 instead of reusing the captured `jobStatus` local as `stopJob()` does. The null path is also not fully equivalent to the old code. If the entry disappears between the two reads, the old direct read followed by `ordinal()` threw. Now `EnumSet.contains(null)` returns false, and `updateJobState(CANCELING)` sees null and skips the transition at lines 328-334 without recreating the entry. Please either switch to the `jobStatus` local or explain why the second read is needed. If you keep it, please acknowledge this missing-entry edge explicitly in the PR rather than describing the null path as unchanged. - **Check-then-act race:** the not-started check in `cancelJob()`/`stopJob()` still runs outside the `PhysicalPlan` monitor. A concurrent `startJob()`/`stateProcess()` can therefore still move the job to SCHEDULED/RUNNING before `updateJobState(CANCELED)`. Do you plan to close this in this PR or handle it separately? If separately, please say where it will be tracked. - **Coverage of the new decision:** the enum table is pinned, but I can't tell from the thread whether anything exercises the `NOT_STARTED_STATUSES` decision in `PhysicalPlan` itself. Could you confirm whether such a test exists, and add one if it doesn't? - **Inline comments:** now that the Javadoc is there, could you confirm whether the comments at the two call sites still repeat the set contents? If they do, please trim them so the Javadoc is the single source. <!-- streview-comment:2487 --> -- 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]
