deardeng opened a new pull request, #68947: URL: https://github.com/apache/doris/pull/68947
pick from https://github.com/apache/doris/pull/68066 Problem Summary: When a BE in a non-normal cloud cluster stays offline, every failed heartbeat after the lost-heartbeat threshold submits another transaction cleanup task. Each task queries get_prepare_txn_by_coordinator, which scans the instance transaction metadata even after cleanup finishes. Restrict these submissions to lost-heartbeat durations in [T, 2T), where T is abort_txn_after_lost_heartbeat_time_second. Keep the existing behavior for NORMAL cloud clusters and non-cloud deployments. This deliberately stops further submissions after the window even if earlier cleanup attempts failed. Limit repeated transaction cleanup task submissions for offline BEs in non-normal cloud clusters to a bounded window (5 to 10 minutes after the last successful heartbeat with the default configuration). - Test: Add HeartbeatMgrTest coverage for all four non-normal cluster states, durations before/inside/after the window, NORMAL and non-cloud behavior, replay, and missing successful heartbeats. Tests and local compilation were not run as requested. Checkstyle on both changed files and git diff --check passed. - Behavior changed: Yes, stop submitting BE-down cleanup tasks for non-normal cloud clusters once the lost-heartbeat duration reaches twice the threshold. - Does this need documentation: No (cherry picked from commit 0b0ae09153153c73d22e1b2e225f3ae6061a3d2c) ### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into --> -- 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]
