Skip to content

Commit 48ef7eb

Browse files
committed
WIP-37-3-0
1 parent e3cc189 commit 48ef7eb

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

ydb/core/tx/datashard/datashard_ut_incremental_backup.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,6 +3334,11 @@ Y_UNIT_TEST_SUITE(IncrementalBackup) {
33343334
(4, 14, 24, 34);
33353335
)");
33363336

3337+
auto tmp1 = KqpSimpleExecSuccess(runtime, R"(
3338+
SELECT key FROM `/Root/MultiIndexTable` VIEW index1 WHERE value1 = 14
3339+
)");
3340+
Cerr << "BACKUPED___XXX " << tmp1 << Endl;
3341+
33373342
// Create incremental backup
33383343
ExecSQL(server, edgeActor, R"(BACKUP `MultiIndexCollection` INCREMENTAL;)", false);
33393344
SimulateSleep(server, TDuration::Seconds(5));
@@ -3354,6 +3359,11 @@ Y_UNIT_TEST_SUITE(IncrementalBackup) {
33543359
)");
33553360
UNIT_ASSERT_VALUES_EQUAL(expectedTable, actualTable);
33563361

3362+
auto tmp2 = KqpSimpleExecSuccess(runtime, R"(
3363+
SELECT key FROM `/Root/MultiIndexTable` VIEW index1 WHERE value1 = 14
3364+
)");
3365+
Cerr << "RESTORED___XXX " << tmp2 << Endl;
3366+
33573367
// Verify all indexes work
33583368
auto index1Query = KqpSimpleExecSuccess(runtime, R"(
33593369
SELECT key FROM `/Root/MultiIndexTable` VIEW index1 WHERE value1 = 14

ydb/core/tx/schemeshard/schemeshard__operation_create_restore_incremental_backup.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,13 @@ class TNewRestoreFromAtTable : public TSubOperationWithContext {
417417
.NotDeleted()
418418
.IsTable()
419419
.NotAsyncReplicaTable()
420-
.NotUnderDeleting()
421-
.IsCommonSensePath();
420+
.NotUnderDeleting();
421+
422+
// Allow restoring to private paths (e.g., index implementation tables)
423+
// Skip IsCommonSensePath() check for tables inside index paths
424+
if (!dstTablePath.IsInsideTableIndexPath(false)) {
425+
checks.IsCommonSensePath();
426+
}
422427

423428
if (!checks) {
424429
result->SetError(checks.GetStatus(), checks.GetError());
@@ -558,8 +563,13 @@ bool CreateRestoreMultipleIncrementalBackups(
558563
.IsResolved()
559564
.NotDeleted()
560565
.IsTable()
561-
.NotUnderDeleting()
562-
.IsCommonSensePath();
566+
.NotUnderDeleting();
567+
568+
// Allow restoring to private paths (e.g., index implementation tables)
569+
// Skip IsCommonSensePath() check for tables inside index paths
570+
if (!dstTablePath.IsInsideTableIndexPath(false)) {
571+
checks.IsCommonSensePath();
572+
}
563573
} else {
564574
checks
565575
.FailOnExist(TPathElement::EPathType::EPathTypeTable, false);

0 commit comments

Comments
 (0)