From cc77363b66cb634f4f94d5e497a0e5629b2ac05a Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 20 Jun 2024 09:11:59 +0800 Subject: [PATCH] enhance: Set maxPartitionNum default value to 1024 (#33949) See also #30059 --------- Signed-off-by: Congqi Xia --- configs/milvus.yaml | 2 +- pkg/util/paramtable/component_param.go | 2 +- tests/python_client/common/common_type.py | 2 +- tests/python_client/testcases/test_partition.py | 6 +++--- tests/python_client/testcases/test_partition_key.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configs/milvus.yaml b/configs/milvus.yaml index 190b4e4d96..9bb5f2963e 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -185,7 +185,7 @@ natsmq: # Related configuration of rootCoord, used to handle data definition language (DDL) and data control language (DCL) requests rootCoord: dmlChannelNum: 16 # The number of dml channels created at system startup - maxPartitionNum: 4096 # Maximum number of partitions in a collection + maxPartitionNum: 1024 # Maximum number of partitions in a collection minSegmentSizeToEnableIndex: 1024 # It's a threshold. When the segment size is less than this value, the segment will not be indexed enableActiveStandby: false maxDatabaseNum: 64 # Maximum number of database diff --git a/pkg/util/paramtable/component_param.go b/pkg/util/paramtable/component_param.go index 3376766788..f18510566c 100644 --- a/pkg/util/paramtable/component_param.go +++ b/pkg/util/paramtable/component_param.go @@ -988,7 +988,7 @@ func (p *rootCoordConfig) init(base *BaseTable) { p.MaxPartitionNum = ParamItem{ Key: "rootCoord.maxPartitionNum", Version: "2.0.0", - DefaultValue: "4096", + DefaultValue: "1024", Doc: "Maximum number of partitions in a collection", Export: true, } diff --git a/tests/python_client/common/common_type.py b/tests/python_client/common/common_type.py index 33145b9b24..a2c3c3af2d 100644 --- a/tests/python_client/common/common_type.py +++ b/tests/python_client/common/common_type.py @@ -15,7 +15,7 @@ default_limit = 10 default_batch_size = 1000 max_limit = 16384 max_top_k = 16384 -max_partition_num = 4096 +max_partition_num = 1024 max_role_num = 10 default_partition_num = 16 # default num_partitions for partition key feature default_segment_row_limit = 1000 diff --git a/tests/python_client/testcases/test_partition.py b/tests/python_client/testcases/test_partition.py index f39bbf9998..3c2b40a016 100644 --- a/tests/python_client/testcases/test_partition.py +++ b/tests/python_client/testcases/test_partition.py @@ -663,12 +663,12 @@ class TestPartitionOperations(TestcaseBase): t.join() p_name = cf.gen_unique_str() log.info(f"partitions: {len(collection_w.partitions)}") + err_msg = f"partition number ({ct.max_partition_num}) exceeds max configuration ({ct.max_partition_num})" self.partition_wrap.init_partition( collection_w.collection, p_name, check_task=CheckTasks.err_res, - check_items={ct.err_code: 65535, - ct.err_msg: "partition number (4096) exceeds max configuration (4096), " - "collection: {}".format(collection_w.name)}) + check_items={ct.err_code: 999, + ct.err_msg: err_msg}) # TODO: Try to verify load collection with a large number of partitions. #11651 diff --git a/tests/python_client/testcases/test_partition_key.py b/tests/python_client/testcases/test_partition_key.py index 9bc93f9fa4..39c376432e 100644 --- a/tests/python_client/testcases/test_partition_key.py +++ b/tests/python_client/testcases/test_partition_key.py @@ -203,7 +203,7 @@ class TestPartitionKeyInvalidParams(TestcaseBase): 4. create a collection with max partitions + 1 5. verify the error raised """ - max_partition = 4096 + max_partition = ct.max_partition_num self._connect() pk_field = cf.gen_int64_field(name='pk', is_primary=True) int64_field = cf.gen_int64_field()