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

   ### Background
   
   The cloud recycler uses one record to track a dropped index or partition. It 
reads the tablets one page at a time and deletes the record after it finishes 
the last page.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   PR Type: Bugfix
   
   Problem Summary:
   
   If the recycler lost its lease after page one of two, the scan returned 
success. The recycler deleted the parent record, leaving the next recycler with 
no record to find the tablets on page two.
   
   ### Details
   
   - **Frequency:** Always when the recycler stops between two tablet pages.
   - **Root cause:** The scan returned the last page's result when a stop ended 
the loop.
   - **Why existing tests missed it:** The index and partition tests let the 
scan finish. The cloud regression test checked the job status.
   - **Fix:** Check for a stop before reading each page. Return -1 if the scan 
still has work to do.
   - **Other paths and branches:** Index and partition cleanup share this scan. 
The same stop check appears in branches 3.1, 4.0, 4.1 and 4.2.
   - **Behavior change:** The next recycler can use the saved record to finish 
the scan.
   
   ### Testing
   
   Both new tests failed before the fix and passed after it. They check
   that the first tablet is gone, the parent record and second tablet
   remain, and the next recycler can finish cleanup. The Cloud ASAN build
   passed. The wider Recycler test run was stopped early.
   
   ### Release note
   
   Losing a lease between tablet pages now keeps the recycle record for the 
next run.
   
   ### Check List (For Author)
   
   - Behavior changed: Yes (see Details)
   - Does this need documentation: No
   - Pre-submission status: Partially verified: the wider Recycler test run was 
stopped early.


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