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

Anu Engineer commented on HDDS-523:
-----------------------------------

The code changes look correct, but some issues in testing results. I would be 
good to verify if these are expected results.
 # Calling the delete with wrong volume – the bucket exists on vol2/bucket2.

{code:java}
aws s3 --endpoint-url http://localhost:9878/vol1 rm  s3://bucket2/dir1/
delete failed: s3://bucket2/dir1/ An error occurred (404) when calling the 
DeleteObject operation: Not Found{code}
This seems like the right thing to do.

2. Calling with wrong bucket name – bucket1 instead of bucket2.
{code:java}
aengineer@HW11767 ~/a/h/h/d/t/o/c/ozones3> aws s3 --endpoint-url 
http://localhost:9878/vol2 rm  s3://bucket1/dir1/
delete failed: s3://bucket1/dir1/ An error occurred (500) when calling the 
DeleteObject operation (reached max retries: 4): Internal Server Error{code}
It failed with internal server error. Perhaps we are getting an error in

_OzoneBucket bucket = getBucket(volumeName, bucketName);_

_and we are not handling it correctly. It might be a good idea to add some 
logging either debug or in the case of error._

_3. A partial name of the object should not cause a delete. I am not able to 
explain what happened here._
{code:java}
aengineer@HW11767 ~/a/h/h/d/t/o/c/ozones3> aws s3 --endpoint-url 
http://localhost:9878/vol2 rm  s3://bucket2/dir2/
delete: s3://bucket2/dir2/{code}
The object name is aws s3 --endpoint-url http://localhost:9878/vol1 cp 
docker-config  *s3://bucket2/dir1/file1*

So I was expecting this command to fail rather than succeeed.
{code:java}
aengineer@HW11767 ~/a/h/h/d/t/o/c/ozones3> aws s3 --endpoint-url 
http://localhost:9878/vol2 ls  s3://bucket1/dir1/

An error occurred (NoSuchBucket) when calling the ListObjectsV2 operation: The 
specified bucket does not exist{code}
The ls call after the delete fails with saying delete bucket happened. I am 
guessing we have a bug in the delete bucket path and this call landed there.

> Implement DeleteObject REST endpoint
> ------------------------------------
>
>                 Key: HDDS-523
>                 URL: https://issues.apache.org/jira/browse/HDDS-523
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>              Labels: newbie
>         Attachments: HDDS-523.001.patch, HDDS-523.002.patch
>
>
> Simple delete Object call.
> Implemented by HDDS-444 without the acceptance tests.
> https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to