ECS Multi-Object Delete fails to complete when deleting many objects
Summary: ECS: Multi-Object Delete fails to complete when deleting many objects on versions below 3.8.
Symptoms
An application is attempting to delete multiple objects using S3 DeleteObject API for up to 1000 objects. A Multi-Object-Delete (MOD) request is logged to ECS but there is no response returned and the objects are not deleted.
The dataheadsvc log may contain an entry indicating the request was started:
INFO S3MultiObjectDeleteOperations.java (line 113) Starting operation to delete multiple objects for bucket <bucket name> # of objects <#>
If the delete request is successful the dataheadsvc-access log shows a successful POST with 200 code:
POST <namespace> <bucket name>%2F delete HTTP/1.1 200
If the delete does not complete, no POST message is logged to the dataheadsvc-access log. This may occur when the S3 client transaction times out, or if the client otherwise closes the connection before the delete completes.
Cause
S3 Multi-Object delete is handled serially on versions prior to ECS 3.8. As the number of objects in a MOD request increases, the time to complete the transaction increases.
Resolution
This issue is addressed in ECS version 3.8 or higher. S3 Multi-Object deletes runs in parallel for improved performance.
Workaround: Clients can lower the number of object keys being passed to the DeleteObject call. S3 supports a maximum of 1000 keys in one request. Reducing the count to a lower value may allow for the request to complete (for example 200 objects).