Skip to content

Commit

Permalink
commit some suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
  • Loading branch information
Leavrth committed Aug 2, 2023
1 parent 3a035f6 commit da07adb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions br/pkg/restore/log_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ func (rc *logFileManager) createMetaIterOver(ctx context.Context, s storage.Exte
}
return meta, nil
}
// TODO: maybe we need to be able to adjust the concurrency to download files,
// which currently is the same as the chunk size
reader := iter.Transform(namesIter, readMeta,
iter.WithChunkSize(rc.metadataDownloadBatchSize), iter.WithConcurrency(rc.metadataDownloadBatchSize))
return reader, nil
Expand Down
4 changes: 3 additions & 1 deletion br/pkg/task/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const (
flagCipherKeyFile = "crypter.key-file"

flagMetadataDownloadBatchSize = "metadata-download-batch-size"
defaultMetadataDownloadBatchSize = 64
defaultMetadataDownloadBatchSize = 128

unlimited = 0
crypterAES128KeyLen = 16
Expand Down Expand Up @@ -303,6 +303,8 @@ func DefineCommonFlags(flags *pflag.FlagSet) {
flags.Uint(flagMetadataDownloadBatchSize, defaultMetadataDownloadBatchSize,
"the batch size of downloading metadata, such as log restore metadata for truncate or restore")

_ = flags.MarkHidden(flagMetadataDownloadBatchSize)

storage.DefineFlags(flags)
}

Expand Down

0 comments on commit da07adb

Please sign in to comment.