Skip to content

Commit

Permalink
backup: always write to cloud storage in processor
Browse files Browse the repository at this point in the history
This removes the bulkio.backup.proxy_file_writes.enabled setting, and just
always does the behavior of it being true.

Release note (sql change): the setting bulkio.backup.proxy_file_writes.enabled is no longer needed to enable proxied writes which are now the default.
  • Loading branch information
dt committed Aug 5, 2021
1 parent 152982a commit 3fb4afe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
22 changes: 1 addition & 21 deletions pkg/ccl/backupccl/backup_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ var (
time.Minute*5,
settings.NonNegativeDuration,
)
alwaysWriteInProc = settings.RegisterBoolSetting(
"bulkio.backup.proxy_file_writes.enabled",
"return files to the backup coordination processes to write to "+
"external storage instead of writing them directly from the storage layer",
false,
)
smallFileSize = settings.RegisterByteSizeSetting(
"bulkio.backup.merge_file_size",
"size under which backup files will be forwarded to another node to be merged with other smaller files "+
"(and implies files will be buffered in-memory until this size before being written to backup storage)",
16<<20,
settings.NonNegativeInt,
targetFileSize = settings.RegisterByteSizeSetting(
"bulkio.backup.file_size",
"target file size",
Expand Down Expand Up @@ -230,8 +218,6 @@ func runBackupProcessor(
storageConfByLocalityKV[kv] = &conf
}

// If this is a tenant backup, we need to write the file from the SQL layer.
writeSSTsInProcessor := !flowCtx.Cfg.Codec.ForSystemTenant() || alwaysWriteInProc.Get(&clusterSettings.SV)

returnedSSTs := make(chan returnedSST, 1)

Expand Down Expand Up @@ -268,14 +254,8 @@ func runBackupProcessor(
StartTime: span.start,
EnableTimeBoundIteratorOptimization: useTBI.Get(&clusterSettings.SV),
MVCCFilter: spec.MVCCFilter,
ReturnSstBelowSize: smallFileSize.Get(&clusterSettings.SV),
TargetFileSize: storageccl.ExportRequestTargetFileSize.Get(&clusterSettings.SV),
}
if writeSSTsInProcessor {
req.ReturnSST = true
} else {
req.Storage = defaultConf
req.Encryption = spec.Encryption
ReturnSST: true,
}

// If we're doing re-attempts but are not yet in the priority regime,
Expand Down
1 change: 1 addition & 0 deletions pkg/settings/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ var retiredSettings = map[string]struct{}{
"kv.tenant_rate_limiter.write_cost_per_megabyte": {},
"kv.transaction.write_pipelining_max_outstanding_size": {},
"sql.defaults.optimizer_improve_disjunction_selectivity.enabled": {},
"bulkio.backup.proxy_file_writes.enabled": {},
}

// register adds a setting to the registry.
Expand Down

0 comments on commit 3fb4afe

Please sign in to comment.