milvus: [Bug]: [Nightly]Query on a collection will return data after delete all entities
Is there an existing issue for this?
- I have searched the existing issues
Environment
- Milvus version: 76c24db
- Deployment mode(standalone or cluster): cluster
- MQ type(rocksmq, pulsar or kafka): kafka
- SDK version(e.g. pymilvus v2.0.0rc2): 2.2.9.dev16
Current Behavior
Query on a collection will return data after delete all entities.
[2023-05-28T21:34:54.530Z] _________________ TestDeleteOperation.test_delete_entity_loop __________________
[2023-05-28T21:34:54.530Z] [gw3] linux -- Python 3.8.16 /usr/local/bin/python3
[2023-05-28T21:34:54.530Z]
[2023-05-28T21:34:54.530Z] self = <test_delete.TestDeleteOperation object at 0x7fb1162b5970>
[2023-05-28T21:34:54.530Z]
[2023-05-28T21:34:54.530Z] @pytest.mark.tags(CaseLabel.L2)
[2023-05-28T21:34:54.530Z] def test_delete_entity_loop(self):
[2023-05-28T21:34:54.530Z] """
[2023-05-28T21:34:54.530Z] target: test delete all entities one by one in a loop
[2023-05-28T21:34:54.530Z] method: delete data one by one for a loop
[2023-05-28T21:34:54.530Z] expected: No exception
[2023-05-28T21:34:54.530Z] """
[2023-05-28T21:34:54.530Z] # init an auto_id collection and insert tmp_nb data, flush and load
[2023-05-28T21:34:54.530Z] collection_w, _, _, ids = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True, auto_id=True)[0:4]
[2023-05-28T21:34:54.530Z]
[2023-05-28T21:34:54.530Z] for del_id in ids:
[2023-05-28T21:34:54.530Z] expr = f'{ct.default_int64_field_name} in {[del_id]}'
[2023-05-28T21:34:54.530Z] res = collection_w.delete(expr)[0]
[2023-05-28T21:34:54.530Z] assert res.delete_count == 1
[2023-05-28T21:34:54.530Z]
[2023-05-28T21:34:54.530Z] # query with all ids
[2023-05-28T21:34:54.530Z] expr = f'{ct.default_int64_field_name} in {ids}'
[2023-05-28T21:34:54.530Z] > collection_w.query(expr, check_task=CheckTasks.check_query_empty)
[2023-05-28T21:34:54.530Z]
[2023-05-28T21:34:54.658Z] [2023-05-28 20:11:43 - DEBUG - ci_test]: (api_request) : [Collection.query] args: ['int64 in [441792395842082248, 441792395842082249, 441792395842082250, 441792395842082251, 441792395842082252, 441792395842082253, 441792395842082254, 441792395842082255, 441792395842082256, 441792395842082257, 441792395842082258, 441792395842082259, 441792395842082260, 441792395842082261, 44179239......, kwargs: {} (api_request.py:56)
[2023-05-28T21:34:54.658Z] [2023-05-28 20:11:44 - DEBUG - ci_test]: (api_response) : [{'int64': 441792395842085224}, {'int64': 441792395842085225}, {'int64': 441792395842085228}, {'int64': 441792395842085232}, {'int64': 441792395842085234}, {'int64': 441792395842085235}, {'int64': 441792395842085236}, {'int64': 441792395842085243}, {'int64': 441792395842085244}, {'int64': 4417923958...... (api_request.py:31)
Expected Behavior
return empty
Steps To Reproduce
No response
Milvus Log
- link: https://jenkins.milvus.io:18080/blue/organizations/jenkins/Milvus Nightly CI/detail/2.2.0/204/pipeline/176/
- log: artifacts-milvus-distributed-pulsar-nightly-204-pymilvus-e2e-logs.tar.gz
- failed time: [2023-05-28T20:11:44.550Z] [gw3] [ 14%] FAILED testcases/test_delete.py::TestDeleteOperation::test_delete_entity_loop
- collection name: delete_L7kn8Ncn
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 31 (31 by maintainers)
The error has not reproduced since #25849 was merged.