diff options
author | svc <svc@yandex-team.ru> | 2022-06-06 16:47:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-06-06 16:47:07 +0300 |
commit | 0087b374fbbdf87d5f8f7429afa866dfecba977a (patch) | |
tree | e4b4f1da6e886f3f497b5ec82111aa6e1993862c | |
parent | dc15fd98c42d2db36ecc90721a4f446ea56bd4cc (diff) | |
download | ydb-0087b374fbbdf87d5f8f7429afa866dfecba977a.tar.gz |
KIKIMR-14282 change default setting for indexes, split and merge indexes
REVIEW: 2595925
REVIEW: 2597292
x-ydb-stable-ref: a0332e7576bb7732b1a51fb2cde2525f8d2528a2
-rw-r--r-- | ydb/core/tx/schemeshard/schemeshard_utils.cpp | 6 | ||||
-rw-r--r-- | ydb/core/tx/schemeshard/ut_base.cpp | 17 |
2 files changed, 13 insertions, 10 deletions
diff --git a/ydb/core/tx/schemeshard/schemeshard_utils.cpp b/ydb/core/tx/schemeshard/schemeshard_utils.cpp index 4ee28e3543..e4ea14dfa4 100644 --- a/ydb/core/tx/schemeshard/schemeshard_utils.cpp +++ b/ydb/core/tx/schemeshard/schemeshard_utils.cpp @@ -410,9 +410,9 @@ NKikimrSchemeOp::TPartitionConfig PartitionConfigForIndexes( if (indexTableDesc.GetPartitionConfig().HasPartitioningPolicy()) { result.MutablePartitioningPolicy()->CopyFrom(indexTableDesc.GetPartitionConfig().GetPartitioningPolicy()); } else { - result.MutablePartitioningPolicy()->SetSizeToSplit((ui64)1 << 27); - //result.MutablePartitioningPolicy()->SetMinPartitionsCount(1); do not auto merge - result.MutablePartitioningPolicy()->SetMaxPartitionsCount(100); + result.MutablePartitioningPolicy()->SetSizeToSplit(2_GB); + result.MutablePartitioningPolicy()->SetMinPartitionsCount(1); + result.MutablePartitioningPolicy()->SetMaxPartitionsCount(5000); } if (baseTablePartitionConfig.HasPipelineConfig()) { result.MutablePipelineConfig()->CopyFrom(baseTablePartitionConfig.GetPipelineConfig()); diff --git a/ydb/core/tx/schemeshard/ut_base.cpp b/ydb/core/tx/schemeshard/ut_base.cpp index 28392faadd..a6b201c0d0 100644 --- a/ydb/core/tx/schemeshard/ut_base.cpp +++ b/ydb/core/tx/schemeshard/ut_base.cpp @@ -1781,8 +1781,10 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) { NLs::IndexType(NKikimrSchemeOp::EIndexTypeGlobal), NLs::IndexState(NKikimrSchemeOp::EIndexStateReady), NLs::IndexKeys({"value1"})}); - TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/DirA/Table1/UserDefinedIndexByValue1/indexImplTable"), - {NLs::Finished}); + TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/DirA/Table1/UserDefinedIndexByValue1/indexImplTable", true, true), + {NLs::Finished, + NLs::MaxPartitionsCountEqual(5000), + NLs::SizeToSplitEqual(2<<30)}); // 2G TestDescribeResult(DescribePrivatePath(runtime, "/MyRoot/DirA/Table1/UserDefinedIndexByValues"), {NLs::Finished, NLs::IndexType(NKikimrSchemeOp::EIndexTypeGlobal), @@ -9946,8 +9948,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) { {NLs::PathExist, NLs::PathVersionEqual(4), NLs::PartitionCount(1), - NLs::MinPartitionsCountEqual(0), - NLs::MaxPartitionsCountEqual(100)}); + NLs::MinPartitionsCountEqual(1), + NLs::MaxPartitionsCountEqual(5000)}); TestSplitTable(runtime, ++txId, "/MyRoot/table/indexByValue/indexImplTable", R"( @@ -9968,8 +9970,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) { {NLs::PathExist, NLs::PathVersionEqual(5), NLs::PartitionCount(3), - NLs::MinPartitionsCountEqual(0), - NLs::MaxPartitionsCountEqual(100)}); + NLs::MinPartitionsCountEqual(1), + NLs::MaxPartitionsCountEqual(5000)}); // request without token TestAlterTable(runtime, ++txId, "/MyRoot/table/indexByValue/", R"( @@ -10073,7 +10075,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) { NLs::PathVersionOneOf({8}), NLs::PartitionCount(1), NLs::MinPartitionsCountEqual(1), - NLs::MaxPartitionsCountEqual(100)}); + NLs::MaxPartitionsCountEqual(5000), + NLs::SizeToSplitEqual(100500)}); } template <typename TCreateFn, typename TDropFn> |