This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 1a7dd567a fix: retry on 409 with AWS S3 (#6742)
1a7dd567a is described below

commit 1a7dd567ad59a40c7fd5cc7599b22e5d001b93a9
Author: Wolf Vollprecht <[email protected]>
AuthorDate: Tue Oct 28 19:15:29 2025 +0100

    fix: retry on 409 with AWS S3 (#6742)
    
    * retry on 409 with AWS
    
    * use ConditionNotMatch error
---
 core/src/services/s3/error.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/src/services/s3/error.rs b/core/src/services/s3/error.rs
index 381e7c5d9..3244abb44 100644
--- a/core/src/services/s3/error.rs
+++ b/core/src/services/s3/error.rs
@@ -43,6 +43,9 @@ pub(super) fn parse_error(resp: Response<Buffer>) -> Error {
         403 => (ErrorKind::PermissionDenied, false),
         404 => (ErrorKind::NotFound, false),
         304 | 412 => (ErrorKind::ConditionNotMatch, false),
+        // 409 Conflict can be returned e.g. when PutObject with conditions.
+        // In this case the AWS docs say to retry.
+        409 => (ErrorKind::ConditionNotMatch, true),
         // Service like R2 could return 499 error with a message like:
         // Client Disconnect, we should retry it.
         499 => (ErrorKind::Unexpected, true),

Reply via email to