[ 
https://issues.apache.org/jira/browse/HDDS-7922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713144#comment-17713144
 ] 

Neil Joshi edited comment on HDDS-7922 at 4/17/23 3:24 PM:
-----------------------------------------------------------

Should note that although trailing '/' may be in the s3 request, the key stored 
in ozone is normalized, removing any trailing slash.  As a result, on an s3 
file status request or get request, should the key requested have a trailing 
slash, it will match with a key stored in ozone without as it is normalized 
during storing and lookup.  Directory detection can be done on the s3 client, 
as in the patch for this jira, by checking whether key is directory in the  
keyinfo.


was (Author: neiljoshi):
Should note that although trailing '/' may be in the s3 request, the key stored 
in ozone is normalized, removing any trailing slash.  As a result, on an s3 
file status request or get request, should the key requested have a trailing 
slash, it will match with a key stored in ozone without as it is normalized 
during storing and lookup.

> [FSO] S3G folder support fso layout filestatus s3A compatibility
> ----------------------------------------------------------------
>
>                 Key: HDDS-7922
>                 URL: https://issues.apache.org/jira/browse/HDDS-7922
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Neil Joshi
>            Assignee: Mladjan Gadzic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.4.0
>
>         Attachments: FSO S3G folder support - s3A compatibility for 
> filestatus HEAD requests and GET .png
>
>
> Currently there exists an incompatibility with file stats issued with s3a 
> adapter through s3-gateway on directories created with fso layout.  
> S3a expects file status (exist) queries on directories issued through s3 
> gateway to have path names ending with a '/' slash.  The s3gateway returns 
> directory exists on directory paths with and without a trailing slash due to 
> internal path normalization (eg. path/dir1 == path/dir1/).
>  
> File exists, file status is queried by s3A over s3gateway with Head requests 
> (head-object s3 requests).  Proposed is an implementation to resolve the 
> issue and to cover corner cases to support fso folders over s3g by modifying 
> the s3g ObjectEndpoint to check whether the requested path is a directory, if 
> so, to only return ok if path has trailing '/'.  This would support s3 Head 
> requests and Get requests.  The type of object, where file or directory is 
> determined in the head-object and get-object request through checking the 
> keyInfo (modifying the OzoneKey and OzoneKeyDetails) isFile().
>  
> A sample sequence diagram for this is attached.    
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to