diff options
author | Sema Checherinda <checherinda@gmail.com> | 2022-06-01 12:47:00 +0300 |
---|---|---|
committer | Sema Checherinda <checherinda@gmail.com> | 2022-06-01 12:47:00 +0300 |
commit | 7d9fb9b0eba06b85007f4d0205b0859435971051 (patch) | |
tree | bebf5031d12ec73077a69e4988c1426f55a2235a | |
parent | d4a1779f969ba2dd3123986e791e617dc2c571b9 (diff) | |
download | ydb-7d9fb9b0eba06b85007f4d0205b0859435971051.tar.gz |
KIKIMR-14282 change default setting for indexes, split and merge indexes
ref:d115b984ad23f242c8be3e6250bf39a01cce7ff8
-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 9dd94df8cf..d25a60b1bc 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"( @@ -10072,7 +10074,8 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) { {NLs::PathExist, NLs::PartitionCount(1), NLs::MinPartitionsCountEqual(1), - NLs::MaxPartitionsCountEqual(100)}); + NLs::MaxPartitionsCountEqual(5000), + NLs::SizeToSplitEqual(100500)}); } template <typename TCreateFn, typename TDropFn> |