DanielCarter-stack commented on issue #10354:
URL: https://github.com/apache/seatunnel/issues/10354#issuecomment-3759129494

   <!-- code-pr-reviewer -->
   Based on the analysis, the issue involves a NullPointerException when 
submitting a task via Rest API v2 with checkpoint enabled for task recovery.
   
   From the code inspection:
   
   1. In `JobExecutionService.java`, the `submitJob` method calls 
`getCheckpointEnabledFromRequest()` before validating if the job ID is null
   2. When restoring a task, the request may not include proper job 
initialization data
   3. The NPE occurs when trying to access checkpoint configuration on an 
uninitialized context
   
   **Root cause**: Missing null checks for `jobId` and `jobInfo` in the 
checkpoint-enabled submission flow.
   
   **Suggested fix**:
   - Add validation in `submitJob` to ensure `jobId` is present when checkpoint 
is enabled
   - Initialize `jobInfo` before calling checkpoint-related methods
   - See `JobExecutionService.java:245-260` and 
`CheckpointServiceImpl.java:89-105`
   
   Could you please confirm:
   1. Does the NPE occur on every restore attempt or only specific job 
configurations?
   2. What is the exact API request payload you're using?
   3. Are you using the `/jobs/submit` endpoint with `restore_checkpoint=true`?
   
   This will help us validate the fix more precisely.


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