aaltay commented on issue #22008:
URL: https://github.com/apache/beam/issues/22008#issuecomment-1163940464

   > Sure, it's in 
[FluentBackoff.java](https://github.com/apache/beam/blob/52e1b3ff9e9b1c5067b59bbb8053f0bc53f9679f/sdks/java/core/src/main/java/org/apache/beam/sdk/util/FluentBackoff.java#L193).
 You'll note that there's also a bit of randomness added in each step so what 
could very well be happening is that sometimes it maxes out at 9 retries and 
other times it maxes out at 10. With no randomness it would always hit 10 I 
think. It was failing pretty consistently for me in local testing.
   > 
   > That code also has things like max retries, but they don't come into play 
because the defaults are high (INT_MAX and 1000 days of cumulative backlog 
time).
   > 
   > Assuming this test really does need to care about retries it seems like 
there are several fairly straightforward options:
   > 
   > 1. Test for retries > 1 instead of a specific number. This means changes 
to those defaults would go uncaught, but not sure why this particular test 
should care about the specific semantics of the backoff code (which has its own 
tests)
   > 2. Explicitly set the max retries and an appropriate cumulative backoff to 
go with it
   > 3. Seed Random's RNG with a fixed value before the test and use the number 
of retries consistent with that RNG value (if it is indeed switching between 9 
and 10)
   
   Ack. All 3 sounds like reasonable options.


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