Chung-En Lee created HDDS-17869:
-----------------------------------
Summary: S3 DeleteObjects on FSO bucket recursively deletes
non-empty directories
Key: HDDS-17869
URL: https://issues.apache.org/jira/browse/HDDS-17869
Project: Apache Ozone
Issue Type: Bug
Components: Ozone Manager, S3
Affects Versions: 2.0.0, 2.1.0, 1.4.1, 2.2.2, 2.2.0
Reporter: Chung-En Lee
On FSO buckets, S3 DeleteObjects with a directory key ({{dir/}}) deletes the
whole subtree, including objects not listed in the request. A single
DeleteObject on the same key is a no-op.
Regression from HDDS-10572 (1.4.1): multiDelete now calls {{deleteKeys}}, whose
FSO handler {{OmKeysDeleteRequestWithFSO}} (written for recursive bucket
deletion) has no emptiness check. 1.3.0 and 1.4.0 return {{Directory is not
empty}} and keep the data; 1.4.1 through 2.2.2 delete it.
Impact: s3a with {{fs.s3a.directory.marker.retention=delete}} (default before
Hadoop 3.4, used by Flink's S3 plugin) sends this request for parent markers
after every write, wiping sibling data such as Flink checkpoints.
Repro on an FSO bucket:
{code}aws s3api put-object --bucket fso --key c/d2/file1.txt --body f
aws s3api put-object --bucket fso --key c/other.txt --body f
aws s3api delete-objects --bucket fso --delete
'{"Objects":[{"Key":"c/d2/"},{"Key":"c/"}]}'
aws s3api list-objects-v2 --bucket fso --prefix c/
{code}
Expected: both files remain. Actual: both keys reported {{Deleted}}, and {{c/}}
is empty.
Suggested fix: make multi-delete treat a non-empty directory as a no-op, like
single DeleteObject.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]