From 7a9e16a12913e3b815ed87fcc64bf54079ea0f62 Mon Sep 17 00:00:00 2001 From: browndav Date: Mon, 11 Aug 2025 18:15:59 -0400 Subject: [PATCH 1/2] update documentation to make it clearer between seconds and milliseconds --- .../common/policy/RequestRetryOptions.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java index 380a0354b95f..344413913503 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java @@ -46,10 +46,10 @@ public RequestRetryOptions() { *

This value should be based on the bandwidth available to the host machine and proximity to the Storage * service, a good starting point may be 60 seconds per MB of anticipated payload size.

* @param retryDelayInMs Optional. Specifies the amount of delay to use before retrying an operation, default value - * is {@code 4ms} when {@code retryPolicyType} is {@link RetryPolicyType#EXPONENTIAL EXPONENTIAL} and {@code 30ms} - * when {@code retryPolicyType} is {@link RetryPolicyType#FIXED FIXED}. + * is {@code 4_000ms} when {@code retryPolicyType} is {@link RetryPolicyType#EXPONENTIAL EXPONENTIAL} and {@code + * 30_000ms} when {@code retryPolicyType} is {@link RetryPolicyType#FIXED FIXED}. * @param maxRetryDelayInMs Optional. Specifies the maximum delay allowed before retrying an operation, default - * value is {@code 120ms}. + * value is {@code 120_000ms}. * @param secondaryHost Optional. Specified a secondary Storage account to retry requests against, default is none. * *

Before setting this understand the issues around reading stale and potentially-inconsistent data, view these @@ -195,9 +195,9 @@ public long getRetryDelayInMs() { } /** - * Gets the delay between each retry attempt. + * Gets the delay in seconds between each retry attempt. * - * @return the delay between each retry attempt. + * @return the delay in seconds between each retry attempt. */ public Duration getRetryDelay() { return retryDelay; @@ -215,16 +215,16 @@ public long getMaxRetryDelayInMs() { } /** - * Gets the maximum delay allowed between each retry. + * Gets the maximum delay in seconds allowed between each retry. * - * @return the maximum delay allowed between each retry. + * @return the maximum delay in seconds allowed between each retry. */ public Duration getMaxRetryDelay() { return maxRetryDelay; } /** - * Calculates how long to delay before sending the next request. + * Calculates how long in milliseconds to delay before sending the next request. * * @param tryCount An {@code int} indicating which try we are on. * @return A {@code long} value of how many milliseconds to delay. @@ -258,7 +258,8 @@ private long powOfTwo(int exponent) { } /** - * Creates new {@link RequestRetryOptions} from {@link RetryOptions} and let specify storage specific parameters. + * Creates new {@link RequestRetryOptions} from {@link RetryOptions} and let the user specify storage specific + * parameters. * * @param retryOptions The {@link RetryOptions}. * @param tryTimeout Optional. Specified the maximum time allowed before a request is cancelled and From 1b414ba5b61d2f974a9ee59fb596badb6d7f73f8 Mon Sep 17 00:00:00 2001 From: browndav Date: Wed, 13 Aug 2025 12:39:58 -0400 Subject: [PATCH 2/2] change javadocs to remove reference to seconds because return is Duration not int --- .../azure/storage/common/policy/RequestRetryOptions.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java index 344413913503..0ebcc750f850 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java @@ -195,9 +195,9 @@ public long getRetryDelayInMs() { } /** - * Gets the delay in seconds between each retry attempt. + * Gets the delay between each retry attempt. * - * @return the delay in seconds between each retry attempt. + * @return the delay between each retry attempt. */ public Duration getRetryDelay() { return retryDelay; @@ -215,9 +215,9 @@ public long getMaxRetryDelayInMs() { } /** - * Gets the maximum delay in seconds allowed between each retry. + * Gets the maximum delay allowed between each retry. * - * @return the maximum delay in seconds allowed between each retry. + * @return the maximum delay allowed between each retry. */ public Duration getMaxRetryDelay() { return maxRetryDelay;