[ 
https://issues.apache.org/jira/browse/HDDS-10324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mohammad Arafat Khan updated HDDS-10324:
----------------------------------------
    Priority: Blocker  (was: Major)

> Metadata are not updated when keys are overwritten
> --------------------------------------------------
>
>                 Key: HDDS-10324
>                 URL: https://issues.apache.org/jira/browse/HDDS-10324
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: S3
>            Reporter: Duong
>            Assignee: Mohammad Arafat Khan
>            Priority: Blocker
>
> When updating an existing key, the metadata are not updated.
> This can be reproduced on a docker cluster
> {code:java}
> # create bucket
> sh-4.2$ aws s3api --endpoint http://localhost:9878 create-bucket 
> --bucket=bucket
> {
>     "Location": "http://localhost:9878/bucket";
> }
> # reate key
> sh-4.2$ aws s3api --endpoint http://localhost:9878  put-object --bucket 
> bucket --key test --metadata "X-Amz-Meta-Testmetadatakey"="test" --body 
> README.md 
> {
>     "ETag": "\"d5568357dc4eaab62bd52312f884c9be\""
> }
> sh-4.2$ aws s3api --endpoint http://localhost:9878  head-object --bucket 
> bucket --key test                                                             
>     
> {
>     "LastModified": "Wed, 07 Feb 2024 19:32:53 GMT",
>     "ContentLength": 4068,
>     "ETag": "\"d5568357dc4eaab62bd52312f884c9be\"",
>     "CacheControl": "no-cache",
>     "ContentType": "binary/octet-stream",
>     "Expires": "Wed, 07 Feb 2024 19:50:43 GMT",
>     "Metadata": {
>         "X-Amz-Meta-Testmetadatakey": "test"
>     }
> }
> # overriding the key with new metadata
> sh-4.2$ aws s3api --endpoint http://localhost:9878  put-object --bucket 
> bucket --key test --metadata "X-Amz-Meta-Testmetadatakey"="updated" --body 
> README.md 
> {
>     "ETag": "\"d5568357dc4eaab62bd52312f884c9be\""
> }
> # metadata is not updated
> sh-4.2$ aws s3api --endpoint http://localhost:9878  head-object --bucket 
> bucket --key test
> {
>     "LastModified": "Wed, 07 Feb 2024 19:51:11 GMT",
>     "ContentLength": 4068,
>     "ETag": "\"d5568357dc4eaab62bd52312f884c9be\"",
>     "CacheControl": "no-cache",
>     "ContentType": "binary/octet-stream",
>     "Expires": "Wed, 07 Feb 2024 19:51:13 GMT",
>     "Metadata": {
>         "X-Amz-Meta-Testmetadatakey": "test"
>     }
> }
> {code}



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