s3api ListParts does not return all parts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When trying to list the parts of a multipart upload object with a small page size, some parts are missing from the result. This is due to the fact that part "obj/X/10" is sorted before "obj/X/2".
Steps to reproduce (I did this with SAIO virtual machine):
1. create a bucket
aws --endpoint-url http://
2. create a multipart object with at least 11 parts
aws --endpoint-url http://
3. get the upload ID from the logs
journalctl -o short-precise -t proxy-server | grep uploadId | sed -En -e 's,([^?
4. list the parts
aws --endpoint-url http://
This is what I get:
{
"Parts": [
{
"ETag": "\"5f363e0e58a9
"Size": 5242880
},
{
"ETag": "\"5f363e0e58a9
"Size": 5242880
},
{
"ETag": "\"5f363e0e58a9
"Size": 5242880
},
{
"ETag": "\"5f363e0e58a9
"Size": 5242880
},
{
"ETag": "\"5f363e0e58a9
"Size": 5242880
},
{
"ETag": "\"5f363e0e58a9
"Size": 5242880
}
],
"Initiator": {
"ID": "test:tester",
},
"Owner": {
"ID": "test:tester"
},
"StorageClass": "STANDARD"
}
Without specifying a page size in the 4th step, I get the 80 parts of my object.
In attachment is a unit test showing a bad "NextPartNumber
Thanks for the great test! I pushed up https:/ /review. opendev. org/c/openstack /swift/ +/765626 to address. Hope you don't mind but it has you as author, since the vast majority of the changes were yours!