carlsverre opened a new issue, #7044:
URL: https://github.com/apache/opendal/issues/7044

   ### Describe the bug
   
   I see the following error on Tigris and Minio when using 
`WriteOption::if_not_exists`:
   
   ```
   060.244s DEBUG Action::run{action=RemoteCommit { vid: 3nXPhhLYtD7ZN 
}}:put_commit{log=74ggeHXDbm-2tZGLRnRwZAeQ lsn=8}: opendal::services: 
service=s3 name=graft-primary 
path=logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7: write started
   060.245s DEBUG Action::run{action=RemoteCommit { vid: 3nXPhhLYtD7ZN 
}}:put_commit{log=74ggeHXDbm-2tZGLRnRwZAeQ lsn=8}: opendal::services: 
service=s3 name=graft-primary 
path=logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7: write created 
writer
   060.334s  WARN Action::run{action=RemoteCommit { vid: 3nXPhhLYtD7ZN 
}}:put_commit{log=74ggeHXDbm-2tZGLRnRwZAeQ lsn=8}: opendal::services: 
service=s3 name=graft-primary 
path=logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7 written=105: write 
close failed ConditionNotMatch (persistent) at write, context: { uri: 
https://t3.storage.dev/graft-primary/logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7,
 response: Parts { status: 412, version: HTTP/1.1, headers: 
{"access-control-allow-headers": "*", "access-control-allow-methods": "*", 
"access-control-allow-origin": "*", "access-control-expose-headers": "*", 
"content-length": "400", "content-type": "application/xml", "server": "Tigris 
OS", "server-timing": "total;dur=50", "strict-transport-security": 
"max-age=63072000; includeSubDomains; preload", "x-amz-request-id": 
"1765944010531049946", "date": "Wed, 17 Dec 2025 04:00:10 GMT"} }, service: s3, 
path: logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7, written: 105 } => 
S3Er
 ror { code: "PreconditionFailed", message: "At least one of the pre-conditions 
you specified did not hold", resource: 
"/graft-primary/logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7", 
request_id: "1765944010531049946" }
   060.334s DEBUG Action::run{action=RemoteCommit { vid: 3nXPhhLYtD7ZN 
}}:put_commit{log=74ggeHXDbm-2tZGLRnRwZAeQ lsn=8}: opendal::services: 
service=s3 name=graft-primary 
path=logs/74ggeHXDbm-2tZGLRnRwZAeQ/commits/fffffffffffffff7 written=105: write 
close failed
   060.334s  WARN Action::run{action=RemoteCommit { vid: 3nXPhhLYtD7ZN 
}}:put_commit{log=74ggeHXDbm-2tZGLRnRwZAeQ lsn=8}: 
opendal_core::layers::complete: writer has not been closed or aborted, must be 
a bug
   ```
   
   ### Steps to Reproduce
   
   Write to Tigris or Minio (and possibly other object_stores) using this 
request:
   
   ```rust
           self.store
               .write_options(
                   &path,
                   commit.encode_to_bytes(),
                   WriteOptions {
                       // Perform an atomic write operation, returning
                       // a precondition error if the commit already exists
                       if_not_exists: true,
                       concurrent: REMOTE_CONCURRENCY,
                       ..WriteOptions::default()
                   },
               )
               .await?;
   ```
   
   ### Expected Behavior
   
   The writer is properly closed, or the CompletionLayer treats this as an 
expected case.
   
   ### Additional Context
   
   _No response_
   
   ### Are you willing to submit a PR to fix this bug?
   
   - [ ] Yes, I would like to submit a PR.


-- 
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]

Reply via email to