milvus icon indicating copy to clipboard operation
milvus copied to clipboard

[Bug]: The query results do not satisfy the expression, resulting in a shortage of results

Open zhuwenxing opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Environment

- Milvus version:2.2.14 --> 2.3-20231227-eb11b1a5-amd64
- Deployment mode(standalone or cluster):cluster
- MQ type(rocksmq, pulsar or kafka): pulsar   
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

snip code

        expr = "count in [2,4,6,8]"
        if "SQ" in col_name or "PQ" in col_name:
            output_fields = ["count", "random_value"]
        else:
            output_fields = ["count", "random_value", "float_vector"]
        res = c.query(expr, output_fields, timeout=120)
        sorted_res = sorted(res, key=lambda k: k['count'])
        for r in sorted_res:
            logger.info(r)

The expected result is 4 entities, but only got 2 entities, so assert failed collection name is task_1_IVF_PQ

[2023-12-28T08:55:37.479Z] 2023-12-28 08:55:37.233 | INFO     | MainThread |utils:load_and_search:262 - {'count': 2, 'random_value': -18.0}

[2023-12-28T08:55:37.479Z] 2023-12-28 08:55:37.233 | INFO     | MainThread |utils:load_and_search:262 - {'count': 4, 'random_value': -13.0}

[2023-12-28T08:55:37.479Z] Traceback (most recent call last):

[2023-12-28T08:55:37.479Z]   File "scripts/action_after_upgrade.py", line 108, in <module>

[2023-12-28T08:55:37.479Z]     task_1(data_size, host)

[2023-12-28T08:55:37.479Z]   File "scripts/action_after_upgrade.py", line 20, in task_1

[2023-12-28T08:55:37.479Z]     load_and_search(prefix)

[2023-12-28T08:55:37.479Z]   File "/home/jenkins/agent/workspace/tests/python_client/deploy/scripts/utils.py", line 264, in load_and_search

[2023-12-28T08:55:37.479Z]     assert len(res) == 4

before the upgrade, the query result is right

[2023-12-28T08:19:33.865Z] 2023-12-28 08:19:33.752 | INFO     | MainThread |utils:load_and_search:201 - collection name: task_1_IVF_PQ
[2023-12-28T08:19:33.865Z] 2023-12-28 08:19:33.752 | INFO     | MainThread |utils:load_and_search:202 - load collection
[2023-12-28T08:19:38.019Z] 2023-12-28 08:19:37.784 | INFO     | MainThread |utils:load_and_search:206 - load time: 4.0323
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.795 | INFO     | MainThread |utils:load_and_search:220 - {'metric_type': 'L2', 'params': {'nprobe': 10}}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.795 | INFO     | MainThread |utils:load_and_search:223 - 
[2023-12-28T08:19:38.021Z] Search...
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.803 | INFO     | MainThread |utils:load_and_search:234 - hit: id: 1942, distance: 33.15308380126953, entity: {'count': 1942, 'random_value': -18.0}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.803 | INFO     | MainThread |utils:load_and_search:234 - hit: id: 2241, distance: 33.513038635253906, entity: {'count': 2241, 'random_value': -11.0}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.803 | INFO     | MainThread |utils:load_and_search:234 - hit: id: 1619, distance: 33.66971969604492, entity: {'count': 1619, 'random_value': -11.0}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.803 | INFO     | MainThread |utils:load_and_search:234 - hit: id: 1941, distance: 33.68467330932617, entity: {'count': 1941, 'random_value': -11.0}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.804 | INFO     | MainThread |utils:load_and_search:234 - hit: id: 2350, distance: 33.684974670410156, entity: {'count': 2350, 'random_value': -19.0}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.804 | INFO     | MainThread |utils:load_and_search:237 - [1942, 2241, 1619, 1941, 2350]
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.804 | INFO     | MainThread |utils:load_and_search:239 - search latency: 0.0081s
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.811 | INFO     | MainThread |utils:load_and_search:246 - {'count': 2, 'random_value': -18.0, 'float_vector': [0.045505367, 0.5596796, 0.40251842, 0.31393018, 0.0750586, 0.13819127, 0.34483838, 0.25448138, 0.46864972, 0.67636824, 0.5655577, 0.9106075, 0.38581592, 0.13760263, 0.1539729, 0.2586938, 0.758076, 0.88681954, 0.7200193, 0.26500914, 0.8140117, 0.98844755, 0.42864555, 0.26063275, 0.10817126, 0.9639296, 0.103887275, 0.6389359, 0.7066523, 0.78522563, 0.13986847, 0.2864573, 0.44406715, 0.12400892, 0.9904871, 0.43738136, 0.1818657, 0.47727445, 0.37553847, 0.40549624, 0.6947343, 0.19318539, 0.40920797, 0.46860173, 0.2285167, 0.38623723, 0.38900438, 0.9620217, 0.50581473, 0.5247054, 0.56427276, 0.376782, 0.16622664, 0.356377, 0.69092804, 0.46148705, 0.04077919, 0.21210568, 0.3558799, 0.18540034, 0.39870492, 0.5746083, 0.61732924, 0.24253295, 0.20557, 0.08502373, 0.8306493, 0.018839244, 0.63963413, 0.83225393, 0.88992494, 0.90533584, 0.800496, 0.40700942, 0.9850593, 0.8669738, 0.6037453, 0.6875993, 0.90106136, 0.8738279, 0.79922026, 0.8512702, 0.987068, 0.48544592, 0.6677588, 0.84463924, 0.6461845, 0.77619463, 0.3520897, 0.36219785, 0.52494574, 0.7878366, 0.1913054, 0.073552735, 0.9501712, 0.8141775, 0.91353947, 0.22252671, 0.16901422, 0.94917, 0.2191933, 0.6756747, 0.9190445, 0.42324144, 0.8714321, 0.6859301, 0.44542032, 0.8039094, 0.7647919, 0.0016081436, 0.29458916, 0.5941084, 0.70487064, 0.29223964, 0.9533418, 0.7136542, 0.11476637, 0.14864972, 0.14884785, 0.48733923, 0.2479809, 0.08043829, 0.902602, 0.5844801, 0.89581674, 0.67307335, 0.37291774, 0.31484193]}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.811 | INFO     | MainThread |utils:load_and_search:246 - {'count': 4, 'random_value': -13.0, 'float_vector': [0.9628978, 0.3323807, 0.13538729, 0.021368433, 0.6158786, 0.54105264, 0.58026814, 0.46721956, 0.9263391, 0.47922102, 0.7857431, 0.6801136, 0.31610766, 0.9635717, 0.41993997, 0.32136032, 0.25739396, 0.12026017, 0.9152445, 0.46862894, 0.6964561, 0.5286796, 0.050800826, 0.6675435, 0.75054204, 0.363755, 0.08830146, 0.4539255, 0.9728099, 0.8743939, 0.8820242, 0.84187627, 0.7041137, 0.6745949, 0.5073317, 0.86909395, 0.9158548, 0.22547609, 0.6270529, 0.10789554, 0.68271184, 0.238198, 0.31828663, 0.59616035, 0.41532525, 0.9243085, 0.78983444, 0.30327174, 0.41297227, 0.4606064, 0.30478245, 0.41369358, 0.34564185, 0.9292762, 0.18629773, 0.8331733, 0.7091349, 0.4172253, 0.50682026, 0.28151152, 0.8471458, 0.8616691, 0.5259636, 0.45668322, 0.7411019, 0.95904803, 0.3741052, 0.36825523, 0.756062, 0.84400755, 0.9842546, 0.65693045, 0.56995475, 0.8331429, 0.9343548, 0.37697795, 0.6281269, 0.7847759, 0.89071834, 0.54220843, 0.8057526, 0.82884794, 0.20653611, 0.4175695, 0.14869496, 0.3204882, 0.80659735, 0.9002666, 0.25742155, 0.5115318, 0.070998445, 0.7059136, 0.5928341, 0.13177782, 0.7176026, 0.9938736, 0.6202425, 0.8524949, 0.13017896, 0.37607762, 0.9706729, 0.27879, 0.951019, 0.87558115, 0.8586583, 0.7006148, 0.6095192, 0.459202, 0.3135733, 0.15049437, 0.7699235, 0.6857595, 0.32681027, 0.7702522, 0.645007, 0.25536972, 0.28183582, 0.73944086, 0.30991292, 0.9813966, 0.107214056, 0.26777372, 0.4430713, 0.908237, 0.11531149, 0.69731295, 0.48796764, 0.3116066]}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.812 | INFO     | MainThread |utils:load_and_search:246 - {'count': 6, 'random_value': -17.0, 'float_vector': [0.4419059, 0.39617205, 0.7720774, 0.23930739, 0.541345, 0.48981807, 0.9745311, 0.024289904, 0.20773804, 0.0023399624, 0.7305767, 0.18558547, 0.63347274, 0.97905827, 0.92818344, 0.7804541, 0.747085, 0.4503506, 0.97112733, 0.7917173, 0.54938763, 0.81453985, 0.21466668, 0.47605774, 0.8098161, 0.35956553, 0.37951386, 0.4174701, 0.99140865, 0.908055, 0.5999732, 0.17569524, 0.579174, 0.8591695, 0.67371476, 0.38291532, 0.13363571, 0.8336089, 0.7718948, 0.9473515, 0.37527466, 0.70085615, 0.17185125, 0.6794322, 0.11424186, 0.70671016, 0.6393725, 0.033071764, 0.28517687, 0.7016988, 0.9275515, 0.9256658, 0.6308556, 0.06537822, 0.25425184, 0.18287969, 0.495653, 0.94628257, 0.4944854, 0.045843493, 0.15835905, 0.6369623, 0.950773, 0.3237297, 0.53091913, 0.17073007, 0.98230875, 0.14084664, 0.58279306, 0.36460564, 0.87506896, 0.60098875, 0.2256478, 0.84488183, 0.4259841, 0.3903178, 0.8874044, 0.50064754, 0.6868413, 0.11436407, 0.14297667, 0.5928098, 0.86448145, 0.24474105, 0.06156199, 0.13813077, 0.39880186, 0.49578702, 0.7559711, 0.39024526, 0.5906099, 0.29959434, 0.66339886, 0.2747073, 0.14885844, 0.3453429, 0.38248268, 0.7409683, 0.4622779, 0.07296378, 0.232124, 0.028236, 0.23373705, 0.6162755, 0.16262837, 0.29245022, 0.9994892, 0.31109002, 0.7869557, 0.3053473, 0.114458114, 0.72670835, 0.4546112, 0.89191645, 0.2541824, 0.84868604, 0.19337769, 0.22947668, 0.09824476, 0.040759385, 0.49347875, 0.0931422, 0.4996325, 0.8466072, 0.00059349486, 0.30535576, 0.6499224, 0.465032]}
[2023-12-28T08:19:38.021Z] 2023-12-28 08:19:37.812 | INFO     | MainThread |utils:load_and_search:246 - {'count': 8, 'random_value': -13.0, 'float_vector': [0.73276967, 0.23762625, 0.6206042, 0.72376233, 0.8636185, 0.77348, 0.47475785, 0.64111537, 0.1726561, 0.055064462, 0.08024515, 0.24066283, 0.40726647, 0.14709362, 0.66219485, 0.6600487, 0.056939017, 0.053823136, 0.102292605, 0.030848717, 0.81614023, 0.5775857, 0.86016285, 0.45166183, 0.26540327, 0.8253787, 0.59412384, 0.9484266, 0.67477286, 0.2781806, 0.23543139, 0.6591798, 0.4563861, 0.7520877, 0.9075205, 0.5321676, 0.29621407, 0.54809284, 0.76443547, 0.8247257, 0.036691096, 0.7556594, 0.68275934, 0.40793446, 0.28950444, 0.5341822, 0.33980882, 0.32951117, 0.7355723, 0.5820869, 0.38614327, 0.8345338, 0.88742054, 0.009864574, 0.8929369, 0.19256952, 0.2779496, 0.3559702, 0.17099208, 0.45689872, 0.54511744, 0.35657978, 0.9451798, 0.35153294, 0.8804163, 0.16414809, 0.9754814, 0.21237834, 0.37392354, 0.40161133, 0.3046187, 0.6276812, 0.27144966, 0.7799137, 0.530411, 0.2815518, 0.9732091, 0.5600532, 0.2526993, 0.36491454, 0.30473018, 0.12712713, 0.2419715, 0.20677678, 0.2688819, 0.65561485, 0.5373004, 0.6452954, 0.78344804, 0.7559038, 0.46517876, 0.6821611, 0.16215764, 0.9057561, 0.61189824, 0.29667306, 0.8859201, 0.64322424, 0.24423458, 0.161201, 0.3922142, 0.67826, 0.99041516, 0.42340952, 0.6614748, 0.28460425, 0.8126296, 0.91515535, 0.07107578, 0.6976115, 0.67598283, 0.5830367, 0.103518985, 0.6290262, 0.7178736, 0.35625634, 0.9955065, 0.004429134, 0.29311663, 0.44708672, 0.33489826, 0.5329696, 0.88799286, 0.35482293, 0.49153674, 0.14431912, 0.03789337, 0.49104595]}
[2023-12-28T08:19:38.022Z] 2023-12-28 08:19:37.812 | INFO     | MainThread |utils:load_and_search:249 - query latency: 0.0080s

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

failed job: https://qa-jenkins.milvus.io/blue/organizations/jenkins/deploy_test_for_release_cron/detail/deploy_test_for_release_cron/1190/pipeline

log: artifacts-pulsar-cluster-upgrade-1190-server-logs.tar.gz Uploading artifacts-pulsar-cluster-upgrade-1190-pytest-logs.tar.gz…

Anything else?

cluster: 4am namespace: chaos-testing release name: pulsar-cluster-upgrade-1190

This test case works well in standalone mode. https://qa-jenkins.milvus.io/blue/organizations/jenkins/deploy_test_for_release_cron/detail/deploy_test_for_release_cron/1189/pipeline/389

[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.366 | INFO     | MainThread |utils:load_and_search:214 - collection name: task_1_IVF_PQ
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.366 | INFO     | MainThread |utils:load_and_search:215 - load collection
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.370 | INFO     | MainThread |utils:load_and_search:219 - load time: 0.0036
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.382 | INFO     | MainThread |utils:load_and_search:233 - {'metric_type': 'L2', 'params': {'nprobe': 10}}
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.382 | INFO     | MainThread |utils:load_and_search:236 - 
[2023-12-28T08:42:58.416Z] Search...
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:247 - hit: id: 2458, distance: 31.038738250732422, entity: {'count': 2458, 'random_value': -18.0}
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:247 - hit: id: 1646, distance: 31.812707901000977, entity: {'count': 1646, 'random_value': -11.0}
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:247 - hit: id: 1895, distance: 32.116539001464844, entity: {'count': 1895, 'random_value': -20.0}
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:247 - hit: id: 2375, distance: 32.372894287109375, entity: {'count': 2375, 'random_value': -14.0}
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:247 - hit: id: 2142, distance: 32.74089050292969, entity: {'count': 2142, 'random_value': -16.0}
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:250 - [2458, 1646, 1895, 2375, 2142]
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.387 | INFO     | MainThread |utils:load_and_search:252 - search latency: 0.0049s
[2023-12-28T08:42:58.416Z] 2023-12-28 08:42:58.389 | INFO     | MainThread |utils:load_and_search:262 - {'count': 2, 'random_value': -18.0}
[2023-12-28T08:42:58.417Z] 2023-12-28 08:42:58.389 | INFO     | MainThread |utils:load_and_search:262 - {'count': 4, 'random_value': -13.0}
[2023-12-28T08:42:58.417Z] 2023-12-28 08:42:58.389 | INFO     | MainThread |utils:load_and_search:262 - {'count': 6, 'random_value': -14.0}
[2023-12-28T08:42:58.417Z] 2023-12-28 08:42:58.389 | INFO     | MainThread |utils:load_and_search:262 - {'count': 8, 'random_value': -11.0}
[2023-12-28T08:42:58.417Z] 2023-12-28 08:42:58.389 | INFO     | MainThread |utils:load_and_search:265 - query latency: 0.0023s

zhuwenxing avatar Dec 29 '23 02:12 zhuwenxing

/assign @weiliu1031

binbinlv avatar Dec 29 '23 02:12 binbinlv

/unassign @yanliang567

binbinlv avatar Dec 29 '23 02:12 binbinlv

There used to be an issue with the search result lack https://github.com/milvus-io/milvus/issues/24613, but I think it is not the same

zhuwenxing avatar Dec 29 '23 02:12 zhuwenxing

@zhuwenxing Is this issue reproducible stably?

binbinlv avatar Dec 29 '23 03:12 binbinlv

Is this issue reproducible stably?

Not a stable reproduced issue

zhuwenxing avatar Dec 29 '23 07:12 zhuwenxing

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

stale[bot] avatar Jun 16 '24 04:06 stale[bot]