Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update retryable errors and delay#1708

Open
balamurugana wants to merge 1 commit into
minio:masterfrom
balamurugana:Update-retryable-errors-and-delay
Open

Update retryable errors and delay#1708
balamurugana wants to merge 1 commit into
minio:masterfrom
balamurugana:Update-retryable-errors-and-delay

Conversation

@balamurugana

@balamurugana balamurugana commented Jun 16, 2026

Copy link
Copy Markdown
Member

The values are synced with minio-go.

Summary by CodeRabbit

  • Bug Fixes
    • Expanded retryable S3 error conditions to include throttling and request-related errors, improving resilience during transient service disruptions.
    • Increased default retry delay from 100ms to 200ms across multipart operations for better handling of rate-limited requests.

The values are synced with `minio-go`.

Signed-off-by: Bala.FA <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

RETRYABLE_ERRORS in BaseS3Client is expanded with additional S3 throttling/token error codes (e.g., RequestThrottled, ThrottlingException, SlowDown variants). Separately, the default delayMs retry interval is raised from 100ms to 200ms across CompleteMultipartUploadArgs, ComposeObjectArgs, PutObjectBaseArgs, RemoveObjectsArgs, and Http.StatusRetryInterceptor, with matching Javadoc updates.

Changes

Retry configuration tuning

Layer / File(s) Summary
Expanded RETRYABLE_ERRORS set
api/src/main/java/io/minio/BaseS3Client.java
RETRYABLE_ERRORS rebuilt as a broader ImmutableSet, replacing the prior small list with additional S3 throttling, slow-down, and token/limits error codes.
Default retry delay raised to 200ms
api/src/main/java/io/minio/Http.java, api/src/main/java/io/minio/CompleteMultipartUploadArgs.java, api/src/main/java/io/minio/ComposeObjectArgs.java, api/src/main/java/io/minio/PutObjectBaseArgs.java, api/src/main/java/io/minio/RemoveObjectsArgs.java
delayMs field default changed from 100L to 200L in all four args classes and in the StatusRetryInterceptor chained constructor; Javadocs updated to document the new default.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop, hop — no need to rush!
The errors grew, but so did hush.
Two hundred millis, pause and wait,
More throttle codes now passed through gate.
Slow down, SlowDown — the rabbit knows,
A steadier pace is how patience grows! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.77% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating retryable errors (in BaseS3Client) and delay values (across multiple args classes). It is concise, clear, and reflects the primary modifications in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
api/src/main/java/io/minio/Http.java (1)

744-757: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Unify default retry delay across constructor paths.

Line 745 still defaults to 100, while Line 756 now falls back to 200 when interceptor == null. This creates inconsistent retry behavior depending on which constructor path is used (including newDefaultClient() vs chained constructor usage).

Suggested fix
 public StatusRetryInterceptor() {
-  this(RETRIABLE_STATUS_CODES, 100, 5, null, false);
+  this(RETRIABLE_STATUS_CODES, 200, 5, null, false);
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/src/main/java/io/minio/Http.java` around lines 744 - 757, The
StatusRetryInterceptor class has inconsistent default retry delay values across
its constructors. The no-arg constructor on line 745 defaults to 100ms, while
the three-parameter constructor on line 756 falls back to 200ms when interceptor
is null. Unify these by changing the delayMs parameter in the no-arg
StatusRetryInterceptor() constructor from 100 to 200 so all constructor paths
use the same default delay value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@api/src/main/java/io/minio/PutObjectBaseArgs.java`:
- Line 152: The Javadoc comment for the delay setting incorrectly states that a
value <= 0 disables retry, but the actual behavior is that delayMs <= 0 only
disables the backoff delay between retries, while the number of retries is
controlled by the maxRetries parameter. Update the Javadoc comment to correctly
describe that delayMs <= 0 disables the delay between retries (not the retries
themselves), and clarify that retry behavior is controlled by the maxRetries
parameter instead.

---

Outside diff comments:
In `@api/src/main/java/io/minio/Http.java`:
- Around line 744-757: The StatusRetryInterceptor class has inconsistent default
retry delay values across its constructors. The no-arg constructor on line 745
defaults to 100ms, while the three-parameter constructor on line 756 falls back
to 200ms when interceptor is null. Unify these by changing the delayMs parameter
in the no-arg StatusRetryInterceptor() constructor from 100 to 200 so all
constructor paths use the same default delay value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c2894d9b-985d-48b9-a5ee-cde9a7d09439

📥 Commits

Reviewing files that changed from the base of the PR and between 1c9da2c and 346aff6.

📒 Files selected for processing (6)
  • api/src/main/java/io/minio/BaseS3Client.java
  • api/src/main/java/io/minio/CompleteMultipartUploadArgs.java
  • api/src/main/java/io/minio/ComposeObjectArgs.java
  • api/src/main/java/io/minio/Http.java
  • api/src/main/java/io/minio/PutObjectBaseArgs.java
  • api/src/main/java/io/minio/RemoveObjectsArgs.java

}

/** Set delay between retries. Value &lt;= 0 disables retry (default 100ms). */
/** Set delay between retries. Value &lt;= 0 disables retry (default 200ms). */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix delayMs Javadoc behavior wording.

Line 152 says <= 0 disables retry, but delayMs <= 0 only disables backoff delay; retries are controlled by maxRetries.

Suggested fix
-/** Set delay between retries. Value <= 0 disables retry (default 200ms). */
+/** Set delay between retries. Value <= 0 makes no delay (default 200ms). */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/** Set delay between retries. Value &lt;= 0 disables retry (default 200ms). */
/** Set delay between retries. Value <= 0 makes no delay (default 200ms). */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/src/main/java/io/minio/PutObjectBaseArgs.java` at line 152, The Javadoc
comment for the delay setting incorrectly states that a value <= 0 disables
retry, but the actual behavior is that delayMs <= 0 only disables the backoff
delay between retries, while the number of retries is controlled by the
maxRetries parameter. Update the Javadoc comment to correctly describe that
delayMs <= 0 disables the delay between retries (not the retries themselves),
and clarify that retry behavior is controlled by the maxRetries parameter
instead.

@shtripat shtripat left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@shtripat shtripat requested a review from allanrogerr June 16, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants