Skip to content

Commit 3d16717

Browse files
committed
PBM-1366: continue after dropping a collection
1 parent 90ce2aa commit 3d16717

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pbm/archive/backup.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ func (bcp *backupImpl) dumpCollection(ctx context.Context, ns *NamespaceV2) erro
312312

313313
err = cur.Err()
314314
if err != nil {
315-
return errors.Wrap(err, "cursor")
315+
var cmd mongo.CommandError
316+
if !errors.As(err, &cmd) || !cmd.HasErrorMessage("collection dropped") {
317+
return errors.Wrap(err, "cursor")
318+
}
316319
}
317320

318321
err = file.Close()

0 commit comments

Comments
 (0)