Skip to content

[Bug]: [delete-by-expr] delete_count always returns the number of entities in the filter expression, even if none were deleted #51566

Description

@simonhearne

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: 2.6.18
- Deployment mode(standalone or cluster): standalone
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus v2.6.14

Current Behavior

When deleting entities with:

res = client.delete(
    collection_name="collection",
    db_name="default",
    filter="id IN ['valid_id_will_be_deleted','valid_id_already_deleted','never_existed_id]"
)

The response is always:

{'delete_count': 3}

Expected Behavior

The delete_count value is misleading, as only one entity was actually deleted in the example.

The response should have the requested deletions, successful deletions and failed deletions, ideally each as array of values in filter expression that worked / failed respectively so the client application can report and recover.

Steps To Reproduce

1. Create a collection with an id field
2. Attempt to delete entities with invalid id values
3. Observe delete_count does not reflect actual deleted entities

Milvus Log

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

kind/bugIssues or changes related a bugneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions