Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore: limit scan region concurency during restore (#50255) #50428

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove scan region timeout
  • Loading branch information
3pointer authored and ti-chi-bot committed Jan 15, 2024
commit eea825f57cedd0bd63cb1270f8d71e8a8c7ca9ac
7 changes: 2 additions & 5 deletions br/pkg/restore/import.go
Original file line number Diff line number Diff line change
@@ -55,8 +55,7 @@ const (
)

const (
importScanRegionTime = 20 * time.Second
gRPCBackOffMaxDelay = 3 * time.Second
gRPCBackOffMaxDelay = 3 * time.Second
// Todo: make it configable
gRPCTimeOut = 25 * time.Minute
)
@@ -545,11 +544,9 @@ func (importer *FileImporter) ImportSSTFiles(
}

err = utils.WithRetry(ctx, func() error {
tctx, cancel := context.WithTimeout(ctx, importScanRegionTime)
defer cancel()
// Scan regions covered by the file range
regionInfos, errScanRegion := split.PaginateScanRegion(
tctx, importer.metaClient, startKey, endKey, split.ScanRegionPaginationLimit)
ctx, importer.metaClient, startKey, endKey, split.ScanRegionPaginationLimit)
if errScanRegion != nil {
return errors.Trace(errScanRegion)
}