Problem/Motivation

When an indexed entity is deleted, only 10 of its associated chunks are removed from the database. This leaves orphaned chunks behind, which can cause errors when attempting to load the deleted entity.

Steps to Reproduce

1. Index an entity that results in more than 10 chunks. 2. Delete the entity. 3. Observe that only 10 chunks are deleted; the remaining chunks persist in the index. 4. Attempt to load the deleted entity, which may lead to errors due to the leftover data.

Proposed Resolution

The deleteItems function relies on getVdbIds, which in turn uses querySearch to retrieve IDs. However, querySearch limits its results to 10 items, causing incomplete deletion.

I have provided a patch that removes this limit, ensuring all associated chunks are properly deleted when an entity is removed.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ayrmax created an issue. See original summary.

ayrmax’s picture

StatusFileSize
new536 bytes
scott_euser’s picture

Version: 1.0.0-beta2 » 1.1.x-dev
Status: Active » Needs work

Hi! Thanks for the contribution, can you make a merge request instead so tests run + easier for us maintaining to review/comment. Thank you!

scott_euser’s picture

Status: Needs work » Needs review
gxleano’s picture

Thanks @ayrmax and @scott_euser!

I've been testing the issue and it seems to be working as expected, so moving to RTBC.

gxleano’s picture

Status: Needs review » Reviewed & tested by the community
scott_euser’s picture

I suppose its fine too; I searched all code that calls querySearch and they all seem to pass a limit so it probably has no other consequences.

I don't understand why the 16,384 limit passed already is not fine though as that seems to match Milvus limit documentation: https://milvus.io/docs/limitations.md - is it indicating that this is a symptom of a wider problem of us not handling limit/topk correctly in Milvus?