You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "wolfv (via GitHub)" <gi...@apache.org> on 2025/10/27 17:31:21 UTC

[PR] fix: retry on 409 with AWS S3 [opendal]

wolfv opened a new pull request, #6742:
URL: https://github.com/apache/opendal/pull/6742

   Trying to fix #6741 
   
   I am not sure if we should do the same for other backends?
   
   Also not sure if the error code is correct?


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: retry on 409 with AWS S3 [opendal]

Posted by "wolfv (via GitHub)" <gi...@apache.org>.
wolfv commented on code in PR #6742:
URL: https://github.com/apache/opendal/pull/6742#discussion_r2466774413


##########
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::Conflict, true),

Review Comment:
   Done, sorry! 



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: retry on 409 with AWS S3 [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #6742:
URL: https://github.com/apache/opendal/pull/6742


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: retry on 409 with AWS S3 [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #6742:
URL: https://github.com/apache/opendal/pull/6742#issuecomment-3452568405

   > I am not sure if we should do the same for other backends?
   
   We might need to go through the docs to check each one, but it’s fine with me to merge this one first.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: retry on 409 with AWS S3 [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6742:
URL: https://github.com/apache/opendal/pull/6742#discussion_r2466541092


##########
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::Conflict, true),

Review Comment:
   Please use `ErrorKind::ConditionNotMatch`



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org