Skip to content

removeObjects() stops after a batch with an error, so later batches are never deleted #1716

Description

@allanrogerr

removeObjects() sends the requested objects to the server in batches of 1000. When a batch returns any error other than NoSuchVersion, the iterator sets completed = error != null (MinioAsyncClient.java line 1120 on master), so it stops after reporting that batch's errors and never sends the remaining batches. The caller sees only the failing batch's errors, and nothing indicates that the later objects were not deleted.

Steps to reproduce

  1. Create a bucket with object lock enabled, and put 1500 objects (obj-0000 to obj-1499).
  2. Enable legal hold on obj-0010.
  3. Call removeObjects() with all 1500 object names and version IDs, and iterate every result.
  4. List the object versions left in the bucket.

Actual result

One error is reported (obj-0010, InvalidRequest), and 501 object versions remain: obj-0010 plus all 500 objects in the second batch.

Expected result

One error is reported, and only obj-0010 remains.

Details

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions