Question

Follow the document's steps

http://docs.openstack.org/developer/swift/overview_large_objects.html

I put 3 segments file and 1 Manifest file successfully

# First, upload the segments
curl -X PUT -H 'X-Auth-Token: ' \
    http:///container/myobject/1 --data-binary 'data1'
curl -X PUT -H 'X-Auth-Token: ' \
    http:///container/myobject/2 --data-binary 'data2'
curl -X PUT -H 'X-Auth-Token: ' \
    http:///container/myobject/3 --data-binary 'data3'

# Next, create the manifest file
curl -X PUT -H 'X-Auth-Token: ' \
    -H 'X-Object-Manifest: container/myobject/' \
    http:///container/myobject --data-binary ''

When I download the object there's no problem ,the object is downloaded

curl -H 'X-Auth-Token: ' http:///container/myobject

But when I want to delete the object it only delete the manifest file ,all the segment file still exist on the cloud.

curl X DELETE -H 'X-Auth-Token: ' http:///container/myobject

How can I delete the object both the manifest file and the segment files? I want to use the API the the SWIFT tool.

Was it helpful?

Solution

You need to delete the segments individually, in the same manner you delete the manifest file.

Keep in mind there is no way to atomically delete a dynamic large object. Even if you delete the manifest file first, the weak consistency model used by the API does not require the effects of two delete operations to appear to users (e.g. in future Get Object calls) in the order they were sent.

OTHER TIPS

The swift CLI tool deletes the complete list of all segment object and the dynamic large object which was created without any content in the API request.

swift delete container_name dynamic_object_name

But using the API's it only deletes the large object file and does not delete the associated segment objects.

The Static Large object file is a better option to choose if you are planning to use API's to delete the segment objects.

Ref:
Static Large object, Dynamic Large object

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top