Skip to content

Commit fe594c3

Browse files
authored
feat(1-1-restore): use 2*shard count transfers for downloading tables (#4407)
The usage of transfer values from the config is replaced with `2 * shard count`. This is necessary because the default config value of 2 is too slow in most cases, and tests have indicated that `2 * shard count` yields the most optimal performance. Also regular restore uses this formula by default. Refs: #4402
1 parent a22c931 commit fe594c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/service/one2onerestore/worker_tables.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ func (w *worker) restoreTables(ctx context.Context, workload []hostWorkload, key
5757
func (w *worker) createDownloadJob(ctx context.Context, table backupspec.FilesMeta, m *backupspec.ManifestInfo, h Host) (int64, error) {
5858
uploadDir := backupspec.UploadTableDir(table.Keyspace, table.Table, table.Version)
5959
remoteDir := m.LocationSSTableVersionDir(table.Keyspace, table.Table, table.Version)
60-
jobID, err := w.client.RcloneCopyPaths(ctx, h.Addr, scyllaclient.TransfersFromConfig, scyllaclient.NoRateLimit, uploadDir, remoteDir, table.Files)
60+
transfers := 2 * h.ShardCount // 2 * shard count showed to be the most optimal value in tests
61+
jobID, err := w.client.RcloneCopyPaths(ctx, h.Addr, transfers, scyllaclient.NoRateLimit, uploadDir, remoteDir, table.Files)
6162
if err != nil {
6263
return 0, errors.Wrapf(err, "copy dir: %s", m.LocationSSTableVersionDir(table.Keyspace, table.Table, table.Version))
6364
}

0 commit comments

Comments
 (0)