Zend Framework

Zend_Service_Amazon_S3::cleanBucket() does not clean all objects as documentation implies

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.11.7
  • Component/s: Zend_Service_Amazon
  • Labels:
    None
  • Tags:

Description

From what I see in trunk cleanBucket is still removing only objects returned by

$objects = $this->getObjectsByBucket($bucket);

This is wrong as it would return default value by amazon which is 1000 objects hence not cleaning whole bucket

Several options:

  • Documentation asks for users to call cleanBucket() until false returned
  • cleanBucket() makes use of $params argument that is currently in trunk (no stable release of it)

More on this

Excerpt from http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1904
Efficiently Deleting Objects

Deleting a large number of objects for which you don't have an external list can be made faster and easier by using the marker function of the LIST operation. Call LIST to get an initial set of objects to DELETE. Step through the list deleting each and saving the key of the last object in the list. Call LIST again using the last object deleted as a marker, and repeat this process until all desired objects have been deleted.

Activity

Hide
Enrico Zimuel added a comment -

Fixed on trunk (commit 24047): added a while to delete more than 1000 objects using the suggestion reported here (Efficiently Deleting Objects): http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1904

Show
Enrico Zimuel added a comment - Fixed on trunk (commit 24047): added a while to delete more than 1000 objects using the suggestion reported here (Efficiently Deleting Objects): http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1904
Hide
Enrico Zimuel added a comment -

Resolved in branches/release-1.11 (commit 24048)

Show
Enrico Zimuel added a comment - Resolved in branches/release-1.11 (commit 24048)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: