kfaraz commented on code in PR #14652:
URL: https://github.com/apache/druid/pull/14652#discussion_r1276302779
##########
server/src/main/java/org/apache/druid/rpc/StandardRetryPolicy.java:
##########
@@ -62,11 +70,27 @@ public static Builder builder()
return new Builder();
}
+ /**
+ * Standard unlimited retry policy. Never stops retrying as long as errors
remain retryable.
+ * See {@link ServiceClient} documentation for details on what errors are
retryable.
+ */
public static StandardRetryPolicy unlimited()
{
return DEFAULT_UNLIMITED_POLICY;
}
+ /**
+ * Retry policy that uses up to about an hour of total wait time. Note that
this is just the total waiting time
+ * between attempts. It does not include the time that each attempt takes to
execute.
+ */
+ public static StandardRetryPolicy aboutAnHour()
Review Comment:
Nit: Would `StandardRetryPolicy.retryUptoAnHour()` or
`StandardRetryPolicy.retryForAnHour()` communicate the intent better?
I initially got confused and thought "why would a policy retry _after_ an
hour". 😅
The "about" part could be left out as the approximate nature of the backoffs
is probably a given. Although, I don't feel strongly about it.
##########
server/src/main/java/org/apache/druid/rpc/StandardRetryPolicy.java:
##########
@@ -62,11 +70,27 @@ public static Builder builder()
return new Builder();
}
+ /**
+ * Standard unlimited retry policy. Never stops retrying as long as errors
remain retryable.
+ * See {@link ServiceClient} documentation for details on what errors are
retryable.
+ */
public static StandardRetryPolicy unlimited()
{
return DEFAULT_UNLIMITED_POLICY;
}
+ /**
+ * Retry policy that uses up to about an hour of total wait time. Note that
this is just the total waiting time
+ * between attempts. It does not include the time that each attempt takes to
execute.
+ */
+ public static StandardRetryPolicy aboutAnHour()
Review Comment:
Nit: Would `StandardRetryPolicy.retryUptoAnHour()` or
`StandardRetryPolicy.retryForAnHour()` communicate the intent better?
I initially got confused and thought "why would a policy retry _after_ an
hour". 😅
The "about" part could be left out as the approximate nature of the backoffs
is probably a given. Although, I don't feel strongly about it.
--
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]