Deletion (delete_many with filter) not fully delete all the matched objects

Description

I use the following two option to delete object:

log_name = ‘**’
delete_response = collection.data.delete_many(
where=Filter.by_property(“log_name”).equal(log_name)
)

2.>


while not query_response or (len(query_response.objects) > 0 and failed_batch_delete_count < 5):
query_response = collection.query.fetch_objects(
filters=Filter.by_property(“log_date”).equal(log_date.replace(tzinfo=timezone.utc)),
limit=batch_size,
)
if len(query_response.objects) > 0:
delete_response = collection.data.delete_many(
where=Filter.by_id().contains_any([object.uuid for object in query_response.objects]),
)

In both cases, it seems not all the objects match the filter conditions were deleted, a.k.a there would be some object matches the filter remains:
query_response = collection.query.fetch_objects(
filters=Filter.by_property(“log_date”).equal(log_date.replace(tzinfo=timezone.utc)),
limit=batch_size,
)
would still return some matched objects.

What is the problem? Is the index apply to all the properties?

Note this does not happen when the collection size is small, e.g. ~ 1M
But happens when collection size is large, e.g. ~200M.

Server Setup Information

  • Weaviate Server Version: v17.0.0
  • Deployment Method: k8s
  • Multi Node? Number of Running Nodes: 7
  • Client Language and Version: 4.7.1
  • Multitenancy?: No

Any additional Information

This sounds a bit similar to the issue Some objects not readable after batch import / flush and switch failed - Support - Weaviate Community Forum we are having from time to time. Could you try if in your case the affected objects are retrievable when using the same filter as in your delete? Also, it would be interesting if you encounter similar errors in the logs as in that ticket. If possible, also try restarting the Weaviate instances to see if that allows for the objects to be found again as that helped in our case.

Also I saw you are using a very old Weaviate version, is there a reason for that?