biley06 opened a new pull request, #71245: URL: https://github.com/apache/doris/pull/71245
### Background Cloud tablet rebalancing tracks warm-up tasks by tablet and compute group, with each task recording its destination backend. The FE periodically checks these tasks and cleans up work for missing or long-dead destination backends. ### What problem does this PR solve? Issue Number: close #71164 Problem Summary: When a destination backend disappears while warm-up tasks are inflight, cleanup can allocate temporary keys for unrelated map entries and remove another compute group's task for the same tablet. Cleanup now matches each task's recorded destination backend, so it removes only tasks targeting that backend. ### Details - **Frequency:** The cleanup path runs when a destination backend is missing or dead beyond the configured threshold. Incorrect removal can occur when another compute group has an inflight task for the same tablet ID. - **Root cause:** `checkInflightWarmUpCacheAsync()` previously reconstructed keys by combining a task's tablet ID with cluster IDs from unrelated map entries. This creates temporary keys across the inflight task/key sets and can target the wrong cluster. - **Why existing tests missed it:** No existing test covered this cleanup scenario. - **Fix:** Match inflight entries by the destination backend stored in each task, then conditionally remove the matching key/value entry. - **Behavior change:** Cleanup removes tasks only when their recorded destination is the missing or long-dead backend; other inflight tasks remain. - **Other paths and branches:** This change is limited to cloud warm-up cleanup in `CloudTabletRebalancer`. ### Testing - Focused FE test `testMissingBackendCleanupPreservesSameTabletInOtherCluster`: passed, 1 test. - Full `CloudTabletRebalancerTest` class: passed, 35 tests. - Maven Checkstyle and `git diff --check`: passed. ### Notes for Reviewers The cleanup helper matches each task's stored destination backend instead of guessing map keys from tablet IDs. The conditional key/value removal also avoids deleting a newer replacement task. ### Release note Fix inflight warm-up cleanup when a destination backend is missing. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: broader regression and release-branch checks were not run. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: implementation, regression test, and commit message. -- 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]
