Skip to content

[Bug]: max_capacity does not allow update in collection field param: invalid parameter #41363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
noob9527 opened this issue Apr 16, 2025 · 5 comments
Open
1 task done
Assignees
Labels
area/api kind/bug Issues or changes related a bug kind/enhancement Issues or changes related to enhancement triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@noob9527
Copy link

noob9527 commented Apr 16, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:2.5.9
- Deployment mode(standalone or cluster):standalone
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):milvus-sdk-java v2.5.7
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

I'm trying to alter an array field's max_capacity, I did exactly the same thing according to the document.

https://milvus.io/docs/alter-collection-field.md#Alter-ARRAY-field

here's my code:

        client.alterCollectionField(
            AlterCollectionFieldReq.builder()
                .collectionName(collection_name)
                .fieldName("current_company_ids")
                .property("max_capacity", "20")
                .build()
        )

I got the following error:

max_capacity does not allow update in collection field param: invalid parameter
io.milvus.v2.exception.MilvusClientException: max_capacity does not allow update in collection field param: invalid parameter
	at io.milvus.v2.utils.RpcUtils.handleResponse(RpcUtils.java:63)
	at io.milvus.v2.service.collection.CollectionService.alterCollectionField(CollectionService.java:233)
	at io.milvus.v2.client.MilvusClientV2.lambda$alterCollectionField$10(MilvusClientV2.java:302)
	at io.milvus.v2.utils.RpcUtils.retry(RpcUtils.java:100)
	at io.milvus.v2.client.MilvusClientV2.alterCollectionField(MilvusClientV2.java:302)

Expected Behavior

succeefully alter the max_capacity of that field

Steps To Reproduce

Milvus Log

[2025/04/16 14:33:24.106 +00:00] [INFO] [proxy/impl.go:1347] ["AlterCollectionField received"] [traceID=b07f836cdd72621e334ae5b88537dfdf] [role=proxy] [db=default] [collection=expert_04_08] [fieldName=current_company_ids] [props="[{\"key\":\"max_capacity\",\"value\":\"20\"}]"]
[2025/04/16 14:33:24.106 +00:00] [WARN] [proxy/task_scheduler.go:508] ["Failed to pre-execute task: max_capacity does not allow update in collection field param: invalid parameter"] [traceID=b07f836cdd72621e334ae5b88537dfdf]
[2025/04/16 14:33:24.106 +00:00] [WARN] [proxy/impl.go:1365] ["AlterCollectionField failed to WaitToFinish"] [traceID=b07f836cdd72621e334ae5b88537dfdf] [role=proxy] [db=default] [collection=expert_04_08] [fieldName=current_company_ids] [props="[{\"key\":\"max_capacity\",\"value\":\"20\"}]"] [error="max_capacity does not allow update in collection field param: invalid parameter"] [errorVerbose="max_capacity does not allow update in collection field param: invalid parameter\n(1) attached stack trace\n  -- stack trace:\n  | github.com/milvus-io/milvus/pkg/v2/util/merr.WrapErrParameterInvalidMsg\n  | \t/workspace/source/pkg/util/merr/utils.go:948\n  | github.com/milvus-io/milvus/internal/proxy.(*alterCollectionFieldTask).PreExecute\n  | \t/workspace/source/internal/proxy/task.go:1231\n  | github.com/milvus-io/milvus/internal/proxy.(*taskScheduler).processTask\n  | \t/workspace/source/internal/proxy/task_scheduler.go:501\n  | github.com/milvus-io/milvus/internal/proxy.(*taskScheduler).definitionLoop.func1\n  | \t/workspace/source/internal/proxy/task_scheduler.go:542\n  | github.com/milvus-io/milvus/pkg/v2/util/conc.(*Pool[...]).Submit.func1\n  | \t/workspace/source/pkg/util/conc/pool.go:82\n  | github.com/panjf2000/ants/v2.(*goWorker).run.func1\n  | \t/go/pkg/mod/github.com/panjf2000/ants/[email protected]/worker.go:67\n  | runtime.goexit\n  | \t/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1695\nWraps: (2) max_capacity does not allow update in collection field param\nWraps: (3) invalid parameter\nError types: (1) *withstack.withStack (2) *errutil.withPrefix (3) merr.milvusError"] [BeginTs=457392522289217538] [EndTs=457392522289217538]

Anything else?

No response

@noob9527 noob9527 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 16, 2025
@yanliang567
Copy link
Contributor

for now, this is by design. @czs007 please help to check if there are any plans to support it.

/assign @czs007
/unassign

@sre-ci-robot sre-ci-robot assigned czs007 and unassigned yanliang567 Apr 17, 2025
@yanliang567 yanliang567 added kind/enhancement Issues or changes related to enhancement area/api triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 17, 2025
@yanliang567 yanliang567 added this to the 2.6.0 milestone Apr 17, 2025
@xiaofan-luan
Copy link
Collaborator

what does max_capacity mean?

@yanliang567
Copy link
Contributor

what does max_capacity mean?

means the max length of an array

@xiaofan-luan
Copy link
Collaborator

/assign @JsDove
please help on it

@JsDove
Copy link
Contributor

JsDove commented Apr 18, 2025

/assign @yanliang567 please help test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/bug Issues or changes related a bug kind/enhancement Issues or changes related to enhancement triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants