You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Duong (Jira)" <ji...@apache.org> on 2024/02/07 20:02:00 UTC
[jira] [Updated] (HDDS-10324) Metadata are not updated when keys are overriden
[ https://issues.apache.org/jira/browse/HDDS-10324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Duong updated HDDS-10324:
-------------------------
Description:
When overriding 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}
was:
When overriding an existing key, the metadata are not updated.
This can be reproduced on a docker cluster
{code:java}
sh-4.2$ aws s3api --endpoint http://localhost:9878 create-bucket --bucket=bucket
{
"Location": "http://localhost:9878/bucket"
}
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"
}
}
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\""
}
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}
> Metadata are not updated when keys are overriden
> ------------------------------------------------
>
> Key: HDDS-10324
> URL: https://issues.apache.org/jira/browse/HDDS-10324
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Duong
> Priority: Major
>
> When overriding 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org