bobhan1 opened a new pull request, #67924:
URL: https://github.com/apache/doris/pull/67924

   ### What problem does this PR solve?
   
   Problem Summary:
   
   A cloud warm-up job registers its destination compute group before 
initializing tablet batches. If initialization throws, the outer `run()` 
handler only logs the exception: the job stays `PENDING` and keeps the 
destination registration. Other ONCE/PERIODIC jobs targeting that group cannot 
start. A later successful retry can recover the original job, but repeated 
initialization failures can block the group indefinitely because the warm-up 
timeout only applies to `RUNNING` jobs.
   
   Catch initialization failures before transitioning to `RUNNING` and reuse 
`cancel(..., false)` to persist the error and release the destination 
registration. ONCE jobs become `CANCELLED`; PERIODIC jobs remain `PENDING` and 
retry at their existing interval. Initialization has not submitted work to BEs, 
so this path does not send cleanup RPCs. Successful initialization retains the 
destination registration as before.
   
   ### Release note
   
   Release the destination compute group when cloud warm-up initialization 
fails, allowing subsequent warm-up jobs to proceed. Report the initialization 
error and preserve periodic retry scheduling.
   
   ### Check List (For Author)
   
   - Test: Unit Test. All 30 tests passed across `CloudWarmUpJobTest` (11), 
`CacheHotspotManagerSchedulerTest` (4), and 
`cloud.cache.CacheHotspotManagerTest` (15). New tests cover ONCE/PERIODIC 
initialization failure using the real destination registration map, persisted 
failure state, periodic retry, and continued mutual exclusion after successful 
initialization. Before the fix, both failure-injection cases failed at the 
subsequent-job registration assertion; both successful-initialization cases 
passed.
   - Validation commands: `./build.sh --fe -j100` passed, including Checkstyle; 
`./run-fe-ut.sh --run 
'org.apache.doris.cloud.CloudWarmUpJobTest,org.apache.doris.cloud.CacheHotspotManagerSchedulerTest,org.apache.doris.cloud.cache.CacheHotspotManagerTest'`
 passed; `git diff --check` passed. No live cloud-cluster SQL regression was 
run.
   - Behavior changed: Yes. Failed ONCE initialization cancels the job; failed 
PERIODIC initialization releases the destination registration and waits for its 
next interval.
   - Does this need documentation: No.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to