adoroszlai commented on PR #12106:
URL: https://github.com/apache/ozone/pull/12106#issuecomment-7437707056

   > On FSO buckets before OM supports `recursive=false`, would you prefer S3G 
to fall back to per-key `deleteKey` or reject the request?
   
   I would drop the `recursive` flag and related changes, and fail the request 
with `DIRECTORY_NOT_EMPTY`.  S3A contract test passes with hard-coded 
`recursive=false`:
   
   ```diff
   --- 
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
   +++ 
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
   @@ -409,8 +409,7 @@ public MultiDeleteResponse multiDelete(
          try {
            S3Owner.verifyBucketOwnerCondition(getHeaders(), bucketName, 
bucket.getOwner());
            // An OzoneManager that does not support it deletes FSO directories 
recursively, as before.
   -        boolean recursive =
   -            
!OzoneManagerVersion.NON_RECURSIVE_DELETE_KEYS.isSupportedBy(getClientProtocol().getOmVersion());
   +        boolean recursive = false;
            undeletedKeyResultMap = bucket.deleteKeys(deleteKeys, true, 
recursive);
            for (DeleteObject d : request.getObjects()) {
              ErrorInfo error = undeletedKeyResultMap.get(d.getKey());
   ```
   
   Am I missing something?


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