ivandika3 commented on code in PR #9815:
URL: https://github.com/apache/ozone/pull/9815#discussion_r3020529584


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -281,21 +299,24 @@ Response handlePutRequest(ObjectRequestContext context, 
String keyPath, InputStr
           getCustomMetadataFromHeaders(getHeaders().getRequestHeaders());
       Map<String, String> tags = getTaggingFromHeaders(getHeaders());
 
+      boolean hasConditionalHeaders = ifNoneMatch != null || ifMatch != null;
       long putLength;
       final String md5Hash;
-      if (isDatastreamEnabled() && !enableEC && length > 
getDatastreamMinLength()) {
+      if (isDatastreamEnabled() && !enableEC
+          && length > getDatastreamMinLength() && !hasConditionalHeaders) {
         perf.appendStreamMode();
         Pair<String, Long> keyWriteResult = ObjectEndpointStreaming
             .put(bucket, keyPath, length, replicationConfig, getChunkSize(),
-                customMetadata, tags, multiDigestInputStream, getHeaders(), 
signatureInfo.isSignPayload(), perf);
+                customMetadata, tags, multiDigestInputStream, getHeaders(),
+                signatureInfo.isSignPayload(), perf);

Review Comment:
   @peterxcli Seems you need to introduce conditional APIs for stream APIs 
(i.e. `createStreamKey`) and pass the related conditional request parameter 
(ifNoneMatch, etc) to `ObjectEndpointStreaming` or reparse the header in 
`ObjectEndpointStreaming` itself.
   
   We also need to find out why the SDK integration test 
`TestS3SDKWithRatisStreaming` does not fail the conditional request when they 
are not supported.



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