Skip to content

Commit 8d47d0b

Browse files
revert change and adjust numInsertionWorkersDefault to from 10 to 1
1 parent 824d8b1 commit 8d47d0b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cmd/pbm-agent/restore.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
"runtime"
56
"time"
67

78
"github.com/percona/percona-backup-mongodb/pbm/backup"
@@ -120,7 +121,7 @@ func (a *Agent) Restore(ctx context.Context, r *ctrl.RestoreCmd, opid ctrl.OPID,
120121
return
121122
}
122123

123-
numParallelColls := 1
124+
numParallelColls := runtime.NumCPU() / 2
124125
if r.NumParallelColls != nil && *r.NumParallelColls > 0 {
125126
numParallelColls = int(*r.NumParallelColls)
126127
} else if cfg.Restore != nil && cfg.Restore.NumParallelCollections > 0 {

pbm/snapshot/restore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717
preserveUUID = true
1818

1919
batchSizeDefault = 500
20-
numInsertionWorkersDefault = 10
20+
numInsertionWorkersDefault = 1
2121
)
2222

2323
var ExcludeFromRestore = []string{

0 commit comments

Comments
 (0)