1991santhu commented on PR #11654:
URL: https://github.com/apache/seatunnel/pull/11654#issuecomment-5203222809

   Good catch, and you are right that it predates the last commit.
   
   Fixed by flooring at the last scheduled wait that still fitted under the 
cap, rather than half the cap. With a 100000ms base that is 200000, so the 
capped retries now draw [200000, 300000] instead of [150000, 300000] and the 
minimum stops dipping.
   
   It also made the method simpler. The rate_limit_backoff_ms special case is 
gone, since the last uncapped wait is never smaller than the configured 
backoff, so that guarantee falls out for free now.
   
   I went with option A rather than documenting it. The previous scheduled wait 
is derivable from the retry count, so it stays a pure function with no state to 
carry.
   
   Test added in both classes. I checked it fails on the old code first, where 
retry 3 drew 193352 against retry 2's guaranteed 200000.
   
   20 tests pass on JDK 11.
   


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

Reply via email to