Skip to content

Commit 3a97ccb

Browse files
authored
24-3 hotfix: Stop writing indexImplTables' split boundaries to backups (#10664)
1 parent 85cb00a commit 3a97ccb

File tree

2 files changed

+0
-79
lines changed

2 files changed

+0
-79
lines changed

ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ static NKikimrSchemeOp::TPathDescription GetTableDescription(TSchemeShard* ss, c
7676
opts.SetReturnPartitioningInfo(false);
7777
opts.SetReturnPartitionConfig(true);
7878
opts.SetReturnBoundaries(true);
79-
opts.SetReturnIndexTableBoundaries(true);
8079

8180
auto desc = DescribePath(ss, TlsActivationContext->AsActorContext(), pathId, opts);
8281
auto record = desc->GetRecord();

ydb/services/ydb/backup_ut/ydb_backup_ut.cpp

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -249,68 +249,6 @@ void TestTableSplitBoundariesArePreserved(
249249
UNIT_ASSERT_EQUAL(restoredTableDescription.GetKeyRanges(), originalKeyRanges);
250250
}
251251

252-
void TestIndexTableSplitBoundariesArePreserved(
253-
const char* table, const char* index, ui64 indexPartitions, TSession& session,
254-
TBackupFunction&& backup, TRestoreFunction&& restore
255-
) {
256-
const TString indexTablePath = JoinFsPaths(table, index, "indexImplTable");
257-
258-
{
259-
TExplicitPartitions indexPartitionBoundaries;
260-
for (ui32 boundary : {1, 2, 4, 8, 16, 32, 64, 128, 256}) {
261-
indexPartitionBoundaries.AppendSplitPoints(
262-
// split boundary is technically always a tuple
263-
TValueBuilder().BeginTuple().AddElement().OptionalUint32(boundary).EndTuple().Build()
264-
);
265-
}
266-
// By default indexImplTable has auto partitioning by size enabled,
267-
// so you must set min partition count for partitions to not merge immediately after indexImplTable is built.
268-
TPartitioningSettingsBuilder partitioningSettingsBuilder;
269-
partitioningSettingsBuilder
270-
.SetMinPartitionsCount(indexPartitions)
271-
.SetMaxPartitionsCount(indexPartitions);
272-
273-
const auto indexSettings = TGlobalIndexSettings{
274-
.PartitioningSettings = partitioningSettingsBuilder.Build(),
275-
.Partitions = std::move(indexPartitionBoundaries)
276-
};
277-
278-
auto tableBuilder = TTableBuilder()
279-
.AddNullableColumn("Key", EPrimitiveType::Uint32)
280-
.AddNullableColumn("Value", EPrimitiveType::Uint32)
281-
.SetPrimaryKeyColumn("Key")
282-
.AddSecondaryIndex(TIndexDescription("byValue", EIndexType::GlobalSync, { "Value" }, {}, { indexSettings }));
283-
284-
const auto result = session.CreateTable(table, tableBuilder.Build()).ExtractValueSync();
285-
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
286-
}
287-
const auto describeSettings = TDescribeTableSettings()
288-
.WithTableStatistics(true)
289-
.WithKeyShardBoundary(true);
290-
const auto originalIndexTableDescription = GetTableDescription(
291-
session, indexTablePath, describeSettings
292-
);
293-
UNIT_ASSERT_VALUES_EQUAL(originalIndexTableDescription.GetPartitionsCount(), indexPartitions);
294-
const auto& originalKeyRanges = originalIndexTableDescription.GetKeyRanges();
295-
UNIT_ASSERT_VALUES_EQUAL(originalKeyRanges.size(), indexPartitions);
296-
297-
backup(table);
298-
299-
ExecuteDataDefinitionQuery(session, Sprintf(R"(
300-
DROP TABLE `%s`;
301-
)", table
302-
));
303-
304-
restore(table);
305-
const auto restoredIndexTableDescription = GetTableDescription(
306-
session, indexTablePath, describeSettings
307-
);
308-
UNIT_ASSERT_VALUES_EQUAL(restoredIndexTableDescription.GetPartitionsCount(), indexPartitions);
309-
const auto& restoredKeyRanges = restoredIndexTableDescription.GetKeyRanges();
310-
UNIT_ASSERT_VALUES_EQUAL(restoredKeyRanges.size(), indexPartitions);
311-
UNIT_ASSERT_EQUAL(restoredKeyRanges, originalKeyRanges);
312-
}
313-
314252
}
315253

316254
Y_UNIT_TEST_SUITE(BackupRestore) {
@@ -607,20 +545,4 @@ Y_UNIT_TEST_SUITE(BackupRestoreS3) {
607545
);
608546
}
609547

610-
Y_UNIT_TEST(RestoreIndexTableSplitBoundaries) {
611-
TS3TestEnv testEnv;
612-
constexpr const char* table = "/Root/table";
613-
constexpr const char* index = "byValue";
614-
constexpr ui64 indexPartitions = 10;
615-
616-
TestIndexTableSplitBoundariesArePreserved(
617-
table,
618-
index,
619-
indexPartitions,
620-
testEnv.GetSession(),
621-
CreateBackupLambda(testEnv.GetDriver(), testEnv.GetS3Port()),
622-
CreateRestoreLambda(testEnv.GetDriver(), testEnv.GetS3Port())
623-
);
624-
}
625-
626548
}

0 commit comments

Comments
 (0)