Skip to content

DOCS-4809: updates behavior for -j alias and adds stopOnError to mongorestore #2240

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 2 additions & 5 deletions source/includes/options-mongoimport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,9 @@ args: null
description: |
.. versionadded:: 2.2

Forces :program:`mongoimport` to halt the import operation at the
Forces {{program}} to halt the insert operation at the
first error rather than continuing the operation despite errors.

.. versionchanged:: 3.0.0
{{role}} interrupts the import operation when {{program}} encounters
an insert or upsert error. Other error types will not stop
the import.
optional: true
---
program: mongoimport
Expand All @@ -370,6 +366,7 @@ description: |
.. versionadded:: 3.0.0

Specifies the number of insertion workers to run concurrently.
post: |
For large imports, increasing the number of insertion workers
may increase the speed of the import.
optional: true
Expand Down
29 changes: 28 additions & 1 deletion source/includes/options-mongorestore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,40 @@ description: |
optional: true
---
program: mongorestore
name: numInsertionWorkersPerCollection
inherit:
name: numInsertionWorkers
program: mongoimport
file: options-mongoimport.yaml
description: |
.. versionadded:: 3.0.0

Specifies the number of insertion workers to run concurrently per collection.
default: 1
---
program: mongorestore
name: numParallelCollections
aliases: -j
args: int
directive: option
description: |
Number of collections {{program}} should restore
in parallel.

If you specify ``-j`` when restoring a *single* collection, ``-j``
maps to the :option:`--numInsertionWorkersPerCollection` option rather than
{{role}}.
optional: true
default: 4
...
---
program: mongorestore
name: stopOnError
directive: option
args: null
description: |
.. versionadded:: 3.0.0

Forces {{program}} to halt the restore when it encounters an
error.
optional: true
...
4 changes: 4 additions & 0 deletions source/reference/program/mongorestore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ Options

.. include:: /includes/option/option-mongorestore-numParallelCollections.rst

.. include:: /includes/option/option-mongorestore-numInsertionWorkersPerCollection.rst

.. include:: /includes/option/option-mongorestore-stopOnError.rst

.. _mongorestore-path-option:

.. include:: /includes/option/option-mongorestore-<path>.rst
Expand Down