aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

Successful S3 DeleteObjects returns 0 deleted and 0 errors

Open rvernica opened this issue 2 years ago • 2 comments

Describe the bug

I'm submitting DeleteObjects requests in parallel from the same EC2 instance with a list of 1,000 requests each. I verify that the request is successful and check the count of the deleted objects and the count of errors. They are both 0.

Aws::S3::Model::DeleteObjectsRequest deleteReq;
deleteReq.SetBucket(_bucket);
deleteReq.SetDelete(Aws::S3::Model::Delete().WithObjects(objList));
if (outcome.IsSuccess()) {
    const auto &result = outcome.GetResult();
    result.GetErrors().size();  // is 0
    result.GetDeleted().size(); // is 0
}

Expected Behavior

GetDeleted().size() + GetErrors.size() should equal the objList.size()

Current Behavior

GetDeleted().size() = 0
GetErrors.size() = 0
objList.size() = 1000

Reproduction Steps

Aws::S3::Model::DeleteObjectsRequest deleteReq;
deleteReq.SetBucket(_bucket);
deleteReq.SetDelete(Aws::S3::Model::Delete().WithObjects(objList));
if (outcome.IsSuccess()) {
    const auto &result = outcome.GetResult();
    result.GetErrors().size();  // is 0
    result.GetDeleted().size(); // is 0
}

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.8.3

Compiler and Version used

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

Operating System and version

CentOS Linux release 7.7.1908 (Core)

rvernica avatar Apr 22 '22 03:04 rvernica

Do you have the correct policy permissions that would allow you to delete those objects?

jmklix avatar Jun 02 '22 21:06 jmklix

Yes, the objects get deleted. The returned counts are wrong.

rvernica avatar Jun 02 '22 21:06 rvernica

Can you include the logs from when this request is returning 0 deleted?

jmklix avatar Feb 07 '24 00:02 jmklix

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

github-actions[bot] avatar Feb 17 '24 00:02 github-actions[bot]