peterxcli commented on code in PR #10023:
URL: https://github.com/apache/ozone/pull/10023#discussion_r3036595118


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCreateRequest.java:
##########
@@ -497,20 +498,34 @@ protected void validateAtomicRewrite(OmKeyInfo dbKeyInfo, 
KeyArgs keyArgs)
       }
     }
 
-    if (keyArgs.hasExpectedETag()) {
-      String expectedETag = keyArgs.getExpectedETag();
-      if (dbKeyInfo == null) {
-        throw new OMException("Key not found for If-Match",
-            OMException.ResultCodes.KEY_NOT_FOUND);
-      }
-      if (!dbKeyInfo.hasEtag()) {
-        throw new OMException("Key does not have an ETag",
-            OMException.ResultCodes.ETAG_NOT_AVAILABLE);
-      }
-      if (!dbKeyInfo.isEtagEquals(expectedETag)) {
-        throw new OMException("ETag mismatch",
-            OMException.ResultCodes.ETAG_MISMATCH);
-      }
+  }

Review Comment:
   > Saw your 
[[peterxcli/ozone-s3-compatibility](https://github.com/peterxcli/ozone-s3-compatibility?rgh-link-date=2026-04-03T12%3A56%3A30Z)](https://github.com/peterxcli/ozone-s3-compatibility?rgh-link-date=2026-04-03T12%3A56%3A30Z),
 great initiative\!
   
   Thanks @ivandika3 for recognizing the work\!
   
   I've noticed that Ceph's `s3-tests` might not be entirely accurate for true 
S3 compatibility, as some nuances still exist. It seems they mark certain tests 
with a `fails_on_aws` flag, which might be because they implemented the AWS S3 
spec based on their own interpretation. What's worse is that they didn't do 
this consistently for all cases.
   
   Take an example related to conditional requests: they [send an 
`If-None-Match` request where the ETag is not an 
asterisk](https://github.com/ceph/s3-tests/blob/c29bf103f62df65ed342ca4efb1f6d41a77e81e7/s3tests/functional/test_s3.py#L18886-L18918),
 whereas the AWS S3 spec explicitly states: **"Expects the \* character 
(asterisk)."** 
   
   So, an additional review of that S3 compatibility suite is required; the 
actual compatibility numbers might not be as bad as we seem.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to