Skip to content

Commit 800f4b6

Browse files
committed
Fix config.chunks processing during restore
For bigger files, config.chunks are just partially applied during the selective restore. This fix applies to the whole config.chunks collection's docs from the backup file.
1 parent 85d4787 commit 800f4b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pbm/restore/selective.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,11 @@ func (r *Restore) configsvrRestoreChunks(
338338
models = append(models, mongo.NewInsertOneModel().SetDocument(doc))
339339
}
340340

341-
if len(models) == 0 {
341+
if len(models) == 0 && !done {
342+
// if it's not done, we just reached maxBulkWriteCount, we need to process more
343+
continue
344+
} else if len(models) == 0 && done {
345+
// it's done and there's nothing to update
342346
return nil
343347
}
344348

0 commit comments

Comments
 (0)