Skip to content

Commit b5dacbe

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-42002-prefix-limitation (#170)
* DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation * DOCSP-42002-prefix-limitation --------- Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
1 parent 34357c3 commit b5dacbe

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. warning:: Data Dump and Restore Conflicts with $ Prefix in Fields
2+
3+
Starting in MongoDB 5.0, document field names can be prefixed with a
4+
dollar character (``$``). However, :binary:`~bin.mongodump` and
5+
:binary:`~bin.mongorestore` won't work with field names that are
6+
prefixed with a dollar character in a collection's options.
7+
8+
:manual:`MongoDB Extended JSON
9+
(v2)</reference/mongodb-extended-json>` cannot differentiate between
10+
type wrappers and fields that have the same name as type
11+
wrappers. Don't use extended JSON formats if the
12+
corresponding BSON representation might include ``$`` prefixed keys.
13+
The :ref:`DBRefs <dbref-explanation>` mechanism is an exception to
14+
this general rule.

source/includes/warning-tools-dot-dollar-import-export-restriction.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. warning:: Data Import and Export Conflicts With (``$``) and (``.``)
22

3-
Starting in MongoDB 5.0, document field names can be (``$``)
4-
prefixed and can contain a (``.``). However,
5-
:binary:`~bin.mongoimport` and :binary:`~bin.mongoexport` should not
6-
be used with field names that make use of these characters.
3+
Starting in MongoDB 5.0, document field names can be prefixed with a
4+
dollar character (``$``) and can contain a period character (``.``).
5+
However, :binary:`~bin.mongoimport` and :binary:`~bin.mongoexport`
6+
won't work with field names that use those characters.
77

88
:ref:`MongoDB Extended JSON v2 <extended-json-high-level-ref-v2>`
99
cannot differentiate between type wrappers and fields that happen to

source/mongodump/mongodump-behavior.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ mongodump Behavior, Access, and Usage
3232
the :dbtools:`--archive </mongodump/#std-option-mongodump.--archive>`
3333
option.
3434

35+
.. include:: /includes/warning-tools-dollar-dump-restore-restriction.rst
36+
3537
Behavior
3638
--------
3739

@@ -173,7 +175,7 @@ folders or files.
173175
Data Compression Handling
174176
~~~~~~~~~~~~~~~~~~~~~~~~~
175177

176-
When run against a ``mongod`` instance that uses the
178+
When run on a ``mongod`` instance that uses the
177179
:manual:`WiredTiger </core/wiredtiger>` storage engine,
178180
``mongodump`` outputs uncompressed data.
179181

@@ -188,7 +190,7 @@ FIPS
188190
~~~~
189191

190192
``mongodump`` automatically creates FIPS-compliant
191-
connections to a ``mongod``/``mongos`` that is
193+
connections to a ``mongod`` or ``mongos`` that are
192194
:manual:`configured to use FIPS mode </tutorial/configure-fips>`.
193195

194196
Using ``mongodump`` on Atlas Free and Shared Tier Clusters

source/mongorestore/mongorestore-behavior-access-usage.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ mongorestore Behavior, Access, and Usage
1919
.. |arrow| unicode:: U+27A4
2020
.. |tool-binary| replace:: ``mongorestore``
2121

22+
.. include:: /includes/warning-tools-dollar-dump-restore-restriction.rst
23+
2224
Behavior
2325
--------
2426

@@ -32,9 +34,9 @@ Insert Only
3234

3335
``mongorestore`` can create a new database or add data to an
3436
existing database. However, ``mongorestore`` performs inserts
35-
only and does not perform updates. That is, if restoring documents to
37+
only and does not perform updates. If you restore documents to
3638
an existing database and collection and existing documents have the
37-
same value ``_id`` field as the to-be-restored documents,
39+
same value ``_id`` field as the documents to restore,
3840
``mongorestore`` will *not* overwrite those documents.
3941

4042
Document Order
@@ -58,7 +60,7 @@ Rebuild Indexes
5860
limit.
5961

6062
To avoid this issue, consider using hashed indexes or indexing a
61-
computed value instead. If you want to resolve the index issue after
63+
computed value instead. To resolve the index issue after
6264
restoring the data, you can disable the default index key length
6365
validation on the target database by setting the :binary:`~bin.mongod`
6466
instance's ``failIndexKeyTooLong`` parameter to false.

0 commit comments

Comments
 (0)