milvus icon indicating copy to clipboard operation
milvus copied to clipboard

[Bug]: There is an error with max_length

Open kongbo96 opened this issue 2 years ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Environment

pymilvus 2.2.1
milvus2.1.4

Current Behavior

image

image 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

kongbo96 avatar Mar 28 '23 03:03 kongbo96

sounds like an attu issue. /assign @shanghaikid /unassign

yanliang567 avatar Mar 28 '23 04:03 yanliang567

sounds like an attu issue. /assign @shanghaikid /unassign

Of course not, I use attu just for demonstration purposes. The data actually inserted with pymilvus.

kongbo96 avatar Mar 28 '23 08:03 kongbo96

Yeah, attu will never modify the input/output. @yanliang567

shanghaikid avatar Mar 28 '23 08:03 shanghaikid

@kongbo96 could you please share some lines of code to reproduce the issue? i fail to reproduce it in house.

/assign @kongbo96

yanliang567 avatar Apr 01 '23 01:04 yanliang567

/assign @NicoYuan1986 could you please help to reproduce it in house?

yanliang567 avatar Apr 11 '23 02:04 yanliang567

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: image Not expected. A MilvusException is needed.

NicoYuan1986 avatar Apr 11 '23 10:04 NicoYuan1986

I thought this is already fixed with latest 2.2.5, check it @NicoYuan1986

xiaofan-luan avatar Apr 11 '23 18:04 xiaofan-luan

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)>

NicoYuan1986 avatar Apr 12 '23 02:04 NicoYuan1986

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 May 12 '23 06:05 stale[bot]

/reopen

Surya165 avatar Aug 29 '23 07:08 Surya165

@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.

sre-ci-robot avatar Aug 29 '23 07:08 sre-ci-robot

@Surya165 please try to file a new issue with logs and reproduce code attached, if you met any problems

yanliang567 avatar Aug 29 '23 08:08 yanliang567