nielifeng opened a new issue, #11473:
URL: https://github.com/apache/seatunnel/issues/11473

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue) and found no 
similar issues.
   
   ### What happened
   
   Zeta REST `stop-job` with `isStopWithSavePoint=true` does not complete for a 
simple streaming job. The REST request times out, and the job remains in 
`DOING_SAVEPOINT` indefinitely until it is manually canceled with a normal stop.
   
   I reproduced this twice with simple `FakeSource -> Console` streaming jobs:
   
   1. `parallelism = 2`, `split.num = 2`
   2. `parallelism = 1`, `split.num = 1`
   
   In both cases:
   
   - The job first reaches `RUNNING`
   - `POST /stop-job` with `isStopWithSavePoint=true` times out
   - `/job-info/{jobId}` stays at `jobStatus = DOING_SAVEPOINT`
   - `/finished-jobs/SAVEPOINT_DONE` does not contain the job
   - Slots remain occupied while the job is stuck
   - A normal `POST /stop-job` with `isStopWithSavePoint=false` can clean it up 
and release slots
   
   Example from the second reproduction:
   
   ```text
   stop-job(isStopWithSavePoint=true):
   curl: Operation timed out after 45006 ms with 0 bytes received
   
   After ~90 seconds:
   jobStatus = DOING_SAVEPOINT
   errorMsg = null
   SourceReceivedCount = 6544976
   SinkWriteCount = 6544969
   SinkCommittedCount = 0
   IntermediateQueueSize = 6
   ```
   
   ### SeaTunnel Version
   
   `3.0.0-SNAPSHOT`, tested on Zeta engine build commit `46d2f39`.
   
   ### SeaTunnel Config
   
   Reproduction config:
   
   ```hocon
   env {
     job.name = "zeta-savepoint-streaming-smoke"
     job.mode = "STREAMING"
     parallelism = 1
     checkpoint.interval = 10000
     checkpoint.timeout = 60000
   }
   
   source {
     FakeSource {
       plugin_output = "fake"
       row.num = 100000000
       split.num = 1
       split.read-interval = 10
       string.length = 16
       schema = {
         fields {
           id = "bigint"
           name = "string"
           age = "int"
         }
       }
     }
   }
   
   sink {
     Console {
       plugin_input = "fake"
       log.print.data = false
     }
   }
   ```
   
   The same behavior was also reproduced with `parallelism = 2` and `split.num 
= 2`.
   
   ### Running Command
   
   Submit:
   
   ```shell
   curl -H 'Content-Type: text/plain' \
     --data-binary @job.conf \
     'http://<zeta-master>:8080/submit-job?format=hocon'
   ```
   
   Stop with savepoint:
   
   ```shell
   curl -H 'Content-Type: application/json' \
     --data '{"jobId": <jobId>, "isStopWithSavePoint": true}' \
     'http://<zeta-master>:8080/stop-job'
   ```
   
   Check status:
   
   ```shell
   curl 'http://<zeta-master>:8080/job-info/<jobId>'
   curl 'http://<zeta-master>:8080/finished-jobs/SAVEPOINT_DONE'
   ```
   
   Cleanup:
   
   ```shell
   curl -H 'Content-Type: application/json' \
     --data '{"jobId": <jobId>, "isStopWithSavePoint": false}' \
     'http://<zeta-master>:8080/stop-job'
   ```
   
   ### Error Exception
   
   No error is returned by `/job-info/{jobId}`:
   
   ```json
   {
     "jobStatus": "DOING_SAVEPOINT",
     "errorMsg": null,
     "metrics": {
       "SourceReceivedCount": "6544976",
       "SinkWriteCount": "6544969",
       "SinkCommittedCount": "0",
       "IntermediateQueueSize": "6"
     }
   }
   ```
   
   The HTTP request itself times out:
   
   ```text
   curl: (28) Operation timed out after 45006 milliseconds with 0 bytes received
   ```
   
   ### Zeta or Flink or Spark Version
   
   Zeta engine, 3 masters and 2 workers.
   
   ### Java or Scala Version
   
   Java 11.
   
   ### Screenshots
   
   N/A
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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