Skip to content

Commit 20c3c8e

Browse files
craig[bot]kev-cao
andcommitted
Merge #153539
153539: backup: check `backup.index.read` cluster setting before checking index r=msbutler a=kev-cao Currently, `ResolveBackupManifests` will check for the existence of an index before checking if `backup.index.read.enabled` is `false`. From a semantic standpoint, the cluster setting should be checked first. Additionally, this caused a suite of roachtests to fail because checking for the existence of the backup index requires `subdir` to be formatted correctly, which some of our older tests do not do. Epic: None Release note: None Co-authored-by: Kevin Cao <[email protected]>
2 parents 5f5c6a6 + 758694d commit 20c3c8e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/backup/backupdest/backup_destination.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,20 @@ func ResolveBackupManifests(
581581
}
582582
defer rootStore.Close()
583583

584+
if !ReadBackupIndexEnabled.Get(&execCfg.Settings.SV) || isCustomIncLocation {
585+
return legacyResolveBackupManifests(
586+
ctx, execCfg, mem, defaultCollectionURI, mkStore,
587+
resolvedSubdir, fullyResolvedBaseDirectory, fullyResolvedIncrementalsDirectory,
588+
endTime, encryption, kmsEnv, user, includeSkipped, includeCompacted,
589+
)
590+
}
591+
584592
exists, err := IndexExists(ctx, rootStore, resolvedSubdir)
585593
if err != nil {
586594
return nil, nil, nil, 0, err
587595
}
588596

589-
if !ReadBackupIndexEnabled.Get(&execCfg.Settings.SV) || !exists || isCustomIncLocation {
597+
if !exists {
590598
return legacyResolveBackupManifests(
591599
ctx, execCfg, mem, defaultCollectionURI, mkStore,
592600
resolvedSubdir, fullyResolvedBaseDirectory, fullyResolvedIncrementalsDirectory,

0 commit comments

Comments
 (0)