You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/04/14 03:03:16 UTC

[GitHub] [ozone] wzhallright opened a new pull request #2154: HDDS-5101. Fix Maxkeys is invalid when delimiter is not null

wzhallright opened a new pull request #2154:
URL: https://github.com/apache/ozone/pull/2154


   JIRA: https://issues.apache.org/jira/browse/HDDS-5101?filter=-2
   
   When get keys from s3g, the keys in my cluster is 
    `
   main/chunk/00000000
   main/chunk/00000001
   ...
   main/chunk/99999999`
   if delimiter is not null, until all keys are queried, the count is always 1 ,so the max-keys is invalid.
   ![image](https://user-images.githubusercontent.com/32935220/114648151-ec094480-9d10-11eb-8f06-09f7453e1c18.png)
   
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] wzhallright removed a comment on pull request #2154: HDDS-5101. Fix Maxkeys is invalid when delimiter is not null

Posted by GitBox <gi...@apache.org>.
wzhallright removed a comment on pull request #2154:
URL: https://github.com/apache/ozone/pull/2154#issuecomment-829973360


   > Thank you, @wzhallright to report this problem
   > 
   > Can you please give more information what is the original problem? What was your s3 request, and what was the expected result?
   > 
   > For me, the current behavior seems to be fine:
   > 
   > I tested it with creating keys in real AWS:
   > 
   > ```
   > aws s3api list-objects --bucket=ozonetest3  | grep Key
   >             "Key": "copyobject/f1",
   >             "Key": "key1",
   >             "Key": "test/dir1/file1",
   >             "Key": "test/dir1/file2",
   >             "Key": "test/dir1/file3",
   >             "Key": "test/dir2/file4",
   >             "Key": "test/dir2/file5",
   >             "Key": "test/dir2/file6",
   >             "Key": "test/dir3/file7",
   > ```
   > 
   > And executing aws cli:
   > 
   > ```
   > aws s3api list-objects --bucket=ozonetest3 --prefix=test/ --delimiter=/ --max-keys=2 {
   >     "IsTruncated": true,
   >     "Marker": "",
   >     "NextMarker": "test/dir2/",
   >     "Name": "ozonetest3",
   >     "Prefix": "test/",
   >     "Delimiter": "/",
   >     "MaxKeys": 2,
   >     "CommonPrefixes": [
   >         {
   >             "Prefix": "test/dir1/"
   >         },
   >         {
   >             "Prefix": "test/dir2/"
   >         }
   >     ],
   >     "EncodingType": "url"
   > }
   > ```
   > 
   > The result looks good to me. As the [documentation says](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html):
   > 
   > > These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value.
   > 
   > But this behavior is implemented with the existing code in Ozone.
   > 
   > What did I miss?
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] wzhallright commented on pull request #2154: HDDS-5101. Fix Maxkeys is invalid when delimiter is not null

Posted by GitBox <gi...@apache.org>.
wzhallright commented on pull request #2154:
URL: https://github.com/apache/ozone/pull/2154#issuecomment-829973360


   > Thank you, @wzhallright to report this problem
   > 
   > Can you please give more information what is the original problem? What was your s3 request, and what was the expected result?
   > 
   > For me, the current behavior seems to be fine:
   > 
   > I tested it with creating keys in real AWS:
   > 
   > ```
   > aws s3api list-objects --bucket=ozonetest3  | grep Key
   >             "Key": "copyobject/f1",
   >             "Key": "key1",
   >             "Key": "test/dir1/file1",
   >             "Key": "test/dir1/file2",
   >             "Key": "test/dir1/file3",
   >             "Key": "test/dir2/file4",
   >             "Key": "test/dir2/file5",
   >             "Key": "test/dir2/file6",
   >             "Key": "test/dir3/file7",
   > ```
   > 
   > And executing aws cli:
   > 
   > ```
   > aws s3api list-objects --bucket=ozonetest3 --prefix=test/ --delimiter=/ --max-keys=2 {
   >     "IsTruncated": true,
   >     "Marker": "",
   >     "NextMarker": "test/dir2/",
   >     "Name": "ozonetest3",
   >     "Prefix": "test/",
   >     "Delimiter": "/",
   >     "MaxKeys": 2,
   >     "CommonPrefixes": [
   >         {
   >             "Prefix": "test/dir1/"
   >         },
   >         {
   >             "Prefix": "test/dir2/"
   >         }
   >     ],
   >     "EncodingType": "url"
   > }
   > ```
   > 
   > The result looks good to me. As the [documentation says](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html):
   > 
   > > These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value.
   > 
   > But this behavior is implemented with the existing code in Ozone.
   > 
   > What did I miss?
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] wzhallright closed pull request #2154: HDDS-5101. Fix Maxkeys is invalid when delimiter is not null

Posted by GitBox <gi...@apache.org>.
wzhallright closed pull request #2154:
URL: https://github.com/apache/ozone/pull/2154


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] wzhallright commented on pull request #2154: HDDS-5101. Fix Maxkeys is invalid when delimiter is not null

Posted by GitBox <gi...@apache.org>.
wzhallright commented on pull request #2154:
URL: https://github.com/apache/ozone/pull/2154#issuecomment-820861111


   The failed UT does not seem to be caused by my modification


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org