Skip to content

Commit 1bb9f92

Browse files
committed
WIP
1 parent 96af589 commit 1bb9f92

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ydb/core/tx/schemeshard/schemeshard__backup_collection_common.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ std::optional<THashMap<TString, THashSet<TString>>> GetBackupRequiredPaths(
132132

133133
// Add index backup metadata directories if incremental backup is enabled
134134
bool incrBackupEnabled = bc->Description.HasIncrementalBackupConfig();
135-
bool omitIndexes = incrBackupEnabled && bc->Description.GetIncrementalBackupConfig().GetOmitIndexes();
135+
136+
// Check OmitIndexes from two possible locations:
137+
// 1. Top-level OmitIndexes field (for full backups)
138+
// 2. IncrementalBackupConfig.OmitIndexes (for incremental backups)
139+
bool omitIndexes = bc->Description.GetOmitIndexes() ||
140+
(incrBackupEnabled && bc->Description.GetIncrementalBackupConfig().GetOmitIndexes());
136141

137142
if (incrBackupEnabled && !omitIndexes) {
138143
for (const auto& item : bc->Description.GetExplicitEntryList().GetEntries()) {

ydb/core/tx/schemeshard/ut_base/ut_base.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11924,9 +11924,12 @@ Y_UNIT_TEST_SUITE(TSchemeShardTest) {
1192411924

1192511925
auto backupDirName = descr.GetChildren(0).GetName().c_str();
1192611926

11927+
// When WithIncremental=true, __ydb_backup_meta directory is created for index backups
11928+
// So we expect 3 children: Table1, DirA, and __ydb_backup_meta
11929+
// When WithIncremental=false, we expect 2 children: Table1 and DirA
1192711930
TestDescribeResult(DescribePath(runtime, Sprintf("/MyRoot/.backups/collections/MyCollection1/%s", backupDirName)), {
1192811931
NLs::PathExist,
11929-
NLs::ChildrenCount(2),
11932+
NLs::ChildrenCount(WithIncremental ? 3 : 2),
1193011933
NLs::Finished,
1193111934
});
1193211935

0 commit comments

Comments
 (0)