milvus
milvus copied to clipboard
[Bug]: There is an error with max_length
Is there an existing issue for this?
- [X] I have searched the existing issues
Environment
pymilvus 2.2.1
milvus2.1.4
Current Behavior

The length of “query“” column data cannot be greater than 10, but the length of “t_deadline_ts“ column data can be greater than 10.
It's ridiculous.
Expected Behavior
No response
Steps To Reproduce
No response
Milvus Log
No response
Anything else?
No response
sounds like an attu issue. /assign @shanghaikid /unassign
sounds like an attu issue. /assign @shanghaikid /unassign
Of course not, I use attu just for demonstration purposes. The data actually inserted with pymilvus.
Yeah, attu will never modify the input/output. @yanliang567
@kongbo96 could you please share some lines of code to reproduce the issue? i fail to reproduce it in house.
/assign @kongbo96
/assign @NicoYuan1986 could you please help to reproduce it in house?
Reproduced. @yanliang567 pymilvus:2.2.1 milvus:2.1.4 code:
fields = [
FieldSchema(name='id', dtype=DataType.INT64, is_primary=True, auto_id=True),
FieldSchema(name='t_id', dtype=DataType.VARCHAR, max_length=32),
FieldSchema(name='t_deadline_ts', dtype=DataType.VARCHAR, max_length=10),
FieldSchema(name='query', dtype=DataType.VARCHAR, max_length=53),
FieldSchema(name='query_embedding', dtype=DataType.FLOAT_VECTOR, dim=768)
]
schema = CollectionSchema(fields)
collection = Collection(name="test_length", schema=schema)
vectors = [[random.random() for _ in range(768)] for _ in range(1)]
entity = [
['06dndisajfhieuw73nkjsdvkjd'],
['111111111111111111111111'],
['1111111'],
vectors
]
collection.insert(entity)
result:
Not expected. A MilvusException is needed.
I thought this is already fixed with latest 2.2.5, check it @NicoYuan1986
Fixed with 2.2.5. milvus: 2.2.5 pymilvus: 2.2.5 When executing the same code:
raise ParamError(message=f"invalid input, length of string exceeds max length. length: {len(s)}, "
pymilvus.exceptions.ParamError: <ParamError: (code=1, message=invalid input, length of string exceeds max length. length: 24, max length: 10)>
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.
/reopen
@Surya165: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@Surya165 please try to file a new issue with logs and reproduce code attached, if you met any problems