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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary: Long-running WAL replay retries can lose their backoff 
because the linear delay is multiplied using 32-bit integers before the result 
is converted to `int64_t`. With the default configuration, retry count 1204 
makes `(1204 - 10) * 1800 * 1000` exceed `INT32_MAX`, potentially causing 
replay on every background scan instead of every 30 minutes.
   
   Promote the retry count to `int64_t` before subtraction and multiplication. 
This preserves the existing backoff formula while keeping the linear delay in 
64-bit arithmetic.
   
   ### Release note
   
   Fix WAL replay backoff overflow after prolonged retries.
   
   ### Check List (For Author)
   
   - Test:
       - [x] No need to test or manual test. Explain why:
           - [x] Other reason: Minimal arithmetic type promotion. No tests 
added at the user's request. No automated tests or full build run. No further 
clang-tidy runs at the user's request; the initial attempt could not analyze 
the file because the local toolchain could not find `emmintrin.h`.
       - Validation: `build-support/clang-format.sh` and 
`build-support/check-format.sh` passed with clang-format 16.0.6; `git diff 
--check` passed. Manually checked the default delay at retry counts 1203, 1204, 
and 1205: 2,152,520,000, 2,154,320,000, and 2,156,120,000 ms, respectively, 
retaining a 1,800,000 ms increment.
   - Behavior changed:
       - [x] Yes. Prolonged failed WAL replays retain the configured backoff 
after the previous 32-bit overflow boundary.
   - Does this need documentation?
       - [x] 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