Skip to content

Commit 95a3454

Browse files
Apply suggestions from code review
fix formatting and add a default value to help Co-authored-by: Dmytro Zghoba <[email protected]>
1 parent fafc6f5 commit 95a3454

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cmd/pbm/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ func main() {
247247
restoreCmd.Flag("num-insertion-workers-per-collection",
248248
"Specifies the number of insertion workers to run concurrently per collection. For large imports, "+
249249
"increasing the number of insertion workers may increase the speed of the import.").
250+
Default("1").
250251
Int32Var(&restore.numInsertionWorkers)
251252
restoreCmd.Flag("ns", `Namespaces to restore (e.g. "db1.*,db2.collection2"). If not set, restore all ("*.*")`).
252253
StringVar(&restore.ns)

pbm/restore/logical.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ type oplogRange struct {
8080
type restoreUsersAndRolesOption bool
8181

8282
// New creates a new restore object
83-
func New(leadConn connect.Client,
83+
func New(
84+
leadConn connect.Client,
8485
nodeConn *mongo.Client,
8586
brief topo.NodeBrief,
8687
cfg *config.Config,
@@ -1331,7 +1332,8 @@ func (r *Restore) applyOplog(ctx context.Context, ranges []oplogRange, options *
13311332
}
13321333

13331334
func (r *Restore) snapshot(input io.Reader, cloneNS snapshot.CloneNS, excludeRouterCollections bool) error {
1334-
rf, err := snapshot.NewRestore(r.brief.URI,
1335+
rf, err := snapshot.NewRestore(
1336+
r.brief.URI,
13351337
r.cfg, cloneNS,
13361338
r.numParallelColls,
13371339
r.numInsertionWorkersPerCol,

0 commit comments

Comments
 (0)