Skip to content

Commit 622201a

Browse files
authored
DOCSP-26471 schema validation - shard key doc directives (#2440)
* DOCSP-26471 schema validation - shard key doc directives * internal review feedback * internal review feedback
1 parent c2ad1cc commit 622201a

26 files changed

+42
-44
lines changed

source/administration/configuration.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ Sharding Configuration
267267

268268
Sharding requires :binary:`~bin.mongod` instances with different
269269
:binary:`~bin.mongod` configurations for the :ref:`config servers
270-
<sharded-cluster-config-server>` and the :doc:`shards
271-
</core/sharded-cluster-shards>`. The config servers store the cluster's
270+
<sharded-cluster-config-server>` and the :ref:`shards
271+
<shards-concepts>`. The config servers store the cluster's
272272
metadata, while the shards store the data.
273273

274274
To configure the config server :binary:`~bin.mongod` instances, in the

source/administration/production-notes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,8 @@ set deployments.
615615
Sharded Clusters
616616
~~~~~~~~~~~~~~~~
617617

618-
See :doc:`Sharded Cluster Production Architecture
619-
</core/sharded-cluster-components>` for an
618+
See :ref:`Sharded Cluster Production Architecture
619+
<sharding-shards>` for an
620620
overview of recommended sharded cluster architectures for production
621621
deployments.
622622

source/core/map-reduce.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ and restrictions on map-reduce operations, see the
9090
Sharded Collections
9191
-------------------
9292

93-
MongoDB supports map-reduce operations on :doc:`sharded collections
94-
</sharding>`.
93+
MongoDB supports map-reduce operations on :ref:`sharded collections
94+
<sharding-background>`.
9595

9696
However, starting in version 4.2, MongoDB deprecates the map-reduce
9797
option to *create* a new sharded collection and the use of the

source/core/security-ldap-external.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ Replica Sets
191191

192192
For :term:`replica sets <replica set>`, configure LDAP authorization on the
193193
:term:`secondary` and :term:`arbiter` members first before configuring the
194-
:term:`primary`. This also applies to :doc:`shard replica sets
195-
</core/sharded-cluster-shards>`, or :ref:`config server replica sets <csrs>`.
194+
:term:`primary`. This also applies to :ref:`shard replica sets
195+
<shards-concepts>`, or :ref:`config server replica sets <csrs>`.
196196
Configure one replica set member at a time to maintain a majority of members
197197
for write availability.
198198

source/core/security-ldap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ Deploying LDAP authentication on a replica set
149149

150150
For :term:`replica sets <replica set>`, configure LDAP authentication on
151151
:term:`secondary` and :term:`arbiter` members first before configuring the
152-
:term:`primary`. This also applies to :doc:`shard replica sets
153-
</core/sharded-cluster-shards>`, or :ref:`config server replica sets <csrs>`.
152+
:term:`primary`. This also applies to :ref:`shard replica sets
153+
<shards-concepts>`, or :ref:`config server replica sets <csrs>`.
154154
Configure one replica set member at a time to maintain a majority of members
155155
for write availability.
156156

source/core/sharded-cluster-components.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Sharded Cluster Components
1818

1919
A MongoDB :term:`sharded cluster` consists of the following components:
2020

21-
* :doc:`shard </core/sharded-cluster-shards>`: Each shard contains a
21+
* :ref:`shard <shards-concepts>`: Each shard contains a
2222
subset of the sharded data. As of MongoDB 3.6, shards must be deployed
2323
as a :term:`replica set`.
2424

source/faq/sharding.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ This document answers common questions about :doc:`/sharding`. See also
1616
the :doc:`/sharding` section in the manual, which provides an
1717
:doc:`overview of sharding </sharding>`, including details on:
1818

19-
- :doc:`Shard Keys and Considerations for Shard Key Selection
20-
</core/sharding-shard-key>`
19+
- :ref:`Shard Keys and Considerations for Shard Key Selection
20+
<sharding-shard-key>`
2121

2222
- :ref:`Query Routing <sharding-read-operations>`
2323

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. note::
22

33
If you are using SELinux, any MongoDB operation that requires
4-
:doc:`server-side JavaScript </core/server-side-javascript>` will
4+
:ref:`server-side JavaScript <server-side-javascript>` will
55
result in segfault errors. :ref:`disable-server-side-js` describes
66
how to disable execution of server-side JavaScript.

source/includes/fact-sharded-cluster-components.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
A MongoDB :term:`sharded cluster` consists of the following components:
22

3-
- :doc:`shard </core/sharded-cluster-shards>`: Each shard contains a
3+
- :ref:`shard <shards-concepts>`: Each shard contains a
44
subset of the sharded data. Each shard can be deployed as a :term:`replica
55
set`.
66

source/includes/limits-sharding-unavailable-operations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ un-sharded collections.
55
The :dbcommand:`geoSearch` command is not supported in sharded
66
environments.
77

8-
In MongoDB 5.0 and earlier, you cannot specify :doc:`sharded collections
9-
</sharding>` in the ``from`` parameter of :pipeline:`$lookup` stages.
8+
In MongoDB 5.0 and earlier, you cannot specify :ref:`sharded collections
9+
<sharding-background>` in the ``from`` parameter of :pipeline:`$lookup` stages.

source/includes/steps-stop-sharded-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ref: stop-shards
1818
content: |
1919
2020
Run :method:`db.shutdownServer()` from the ``admin`` database on each
21-
:doc:`shard </core/sharded-cluster-shards>` replica set member to shutdown
21+
:ref:`shard <shards-concepts>` replica set member to shutdown
2222
its :binary:`mongod <bin.mongod>` process. Shutdown all secondary members
2323
before shutting down the primary in each replica set.
2424

source/reference/command/enableSharding.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Definition
2020
.. versionchanged:: 6.0
2121

2222
Starting in MongoDB 6.0, this command is **not** required to
23-
:doc:`shard </sharding>` a collection.
23+
:ref:`shard <sharding-background>` a collection.
2424

2525
The :dbcommand:`enableSharding` command explicitly creates a database.
2626

source/reference/command/insert.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ three documents. See :ref:`insert-command-output` for details.
195195
Using Insert with ``bypassDocumentValidation``
196196
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197197

198-
If :doc:`schema validation validationActions</core/schema-validation>`
198+
If :ref:`schema validation validationActions <schema-validation-overview>`
199199
are set to ``error``, inserts to a collection return errors for
200200
documents that violate the schema validation rules. To insert documents
201201
which would violate these rules set ``bypassDocumentValidation: true``.

source/reference/command/refineCollectionShardKey.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The command takes the following fields:
8282
- .. _refineCollectionShardKey-key:
8383

8484
The document that specifies the field or fields to use as the
85-
new :doc:`shard key </core/sharding-shard-key>` for the
85+
new :ref:`shard key <sharding-shard-key>` for the
8686
collection.
8787

8888
``{ <existing key specification>, <suffix1>: <1|"hashed">, ... }``

source/reference/command/reshardCollection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The command takes the following fields:
6666
* - ``key``
6767
- document
6868
- The document that specifies the new field or fields to use as the
69-
:doc:`shard key </core/sharding-shard-key/>`.
69+
:ref:`shard key <sharding-shard-key>`.
7070

7171
``{ <field1>: <1|"hashed">, ... }``
7272

source/reference/command/shardCollection.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The command takes the following fields:
7070
* - ``key``
7171
- document
7272
- The document that specifies the field or fields to use as the
73-
:doc:`shard key </core/sharding-shard-key/>`.
73+
:ref:`shard key <sharding-shard-key>`.
7474

7575
``{ <field1>: <1|"hashed">, ... }``
7676

@@ -81,7 +81,7 @@ The command takes the following fields:
8181
- ``"hashed"`` to specify a
8282
:ref:`hashed shard key <hashed-shard-keys>`.
8383

84-
:doc:`shard key </core/sharding-shard-key/>` must be
84+
:ref:`shard key <sharding-shard-key>` must be
8585
supported by an index. Unless the collection is empty, the
8686
index must exist prior to the :dbcommand:`shardCollection`
8787
command. If the collection is empty, MongoDB creates the

source/reference/method/db.killOp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Kill Write Operations
138138

139139
Within a Session
140140
MongoDB drivers associate all operations with a
141-
:doc:`server session </reference/server-sessions>`, with the
141+
:ref:`server session <server-sessions>`, with the
142142
exception of unacknowledged writes.
143143

144144
If the write operation is associated with a session, you can use the

source/reference/method/sh.enableSharding.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Definition
2020
.. versionchanged:: 6.0
2121

2222
Starting in MongoDB 6.0, this method is **not** required to
23-
:doc:`shard </sharding>` a collection.
23+
:ref:`shard <sharding-background>` a collection.
2424

2525
Explicitly creates a database. Use the :binary:`~bin.mongosh` method
2626
:method:`sh.shardCollection()` to shard collections on the database.

source/reference/method/sh.reshardCollection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Definition
4444
- document
4545

4646
- The document that specifies the new field or fields to use as the
47-
:doc:`shard key </core/sharding-shard-key/>`.
47+
:ref:`shard key <sharding-shard-key>`.
4848

4949
``{ <field1>: <1|"hashed">, ... }``
5050

source/reference/method/sh.shardCollection.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Definition
5656
- document
5757

5858
- The document that specifies the field or fields to use as the
59-
:doc:`shard key </core/sharding-shard-key/>`.
59+
:ref:`shard key <sharding-shard-key>`.
6060

6161
``{ <field1>: <1|"hashed">, ... }``
6262

@@ -67,7 +67,7 @@ Definition
6767
- ``"hashed"`` to specify a
6868
:ref:`hashed shard key <hashed-shard-keys>`.
6969

70-
:doc:`shard key </core/sharding-shard-key/>` must be
70+
:ref:`shard key <sharding-shard-key>` must be
7171
supported by an index. Unless the collection is empty, the
7272
index must exist prior to the :dbcommand:`shardCollection`
7373
command. If the collection is empty, MongoDB creates the

source/release-notes/5.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ Closure of Inactive Cursors Opened Within a Session
13211321

13221322
Starting in MongoDB 5.0 (and 4.4.8), cursors created within a
13231323
:doc:`client session </core/read-isolation-consistency-recency>` close
1324-
when the corresponding :doc:`server session </reference/server-sessions>`
1324+
when the corresponding :ref:`server session <server-sessions>`
13251325
ends with the :dbcommand:`killSessions` command, if the session times
13261326
out, or if the client has exhausted the cursor.
13271327
See :ref:`read-operations-cursors`.

source/replication.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ operation, see :doc:`/core/replica-set-primary`.
6161

6262
.. include:: /images/replica-set-read-write-operations-primary.rst
6363

64-
The :doc:`secondaries </core/replica-set-secondary>` replicate the
64+
The :ref:`secondaries <replica-set-secondary-members-ref>` replicate the
6565
primary's oplog and apply the operations to their data sets such that
6666
the secondaries' data sets reflect the primary's data set. If the
6767
primary is unavailable, an eligible secondary will hold an election to
@@ -82,9 +82,8 @@ see :doc:`/core/replica-set-arbiter`.
8282

8383
An :ref:`arbiter <replica-set-arbiter-configuration>` will always be an arbiter
8484
whereas a :doc:`primary </core/replica-set-primary>` may step down and
85-
become a :doc:`secondary </core/replica-set-secondary>` and a
86-
:doc:`secondary </core/replica-set-secondary>` may become the primary
87-
during an election.
85+
become a :ref:`secondary <replica-set-secondary-members-ref>` and a
86+
secondary may become the primary during an election.
8887

8988
.. _asynchronous-replication:
9089

source/sharding.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Sharded Cluster
7171

7272
A MongoDB :term:`sharded cluster` consists of the following components:
7373

74-
* :doc:`shard </core/sharded-cluster-shards>`: Each shard contains a
74+
* :ref:`shard <shards-concepts>`: Each shard contains a
7575
subset of the sharded data. Each shard can be deployed as a :term:`replica
7676
set`.
7777

@@ -94,7 +94,7 @@ collection data across the shards in the cluster.
9494
Shard Keys
9595
----------
9696

97-
MongoDB uses the :doc:`shard key </core/sharding-shard-key>` to
97+
MongoDB uses the :ref:`shard key <sharding-shard-key>` to
9898
distribute the collection's documents across shards. The shard key
9999
consists of a field or multiple fields in the documents.
100100

source/tutorial/connection-pool-performance-tuning.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Tuning Your Connection Pool Settings
2222
- Solution
2323

2424
* - Slow application-side operation times that are not reflected in
25-
the database :doc:`server logs </reference/log-messages>` or the
25+
the database :ref:`server logs <log-messages-ref>` or the
2626
real time panel.
2727

2828
- Use :urioption:`connectTimeoutMS` to ensure the driver does not
@@ -46,9 +46,8 @@ Tuning Your Connection Pool Settings
4646
Set :urioption:`socketTimeoutMS` to two or three times the
4747
length of the slowest operation that the driver runs.
4848

49-
* - The :doc:`server logs </reference/log-messages>` or real time panel
50-
show that the application spends too much time creating new
51-
connections.
49+
* - The server logs or real time panel show that the application
50+
spends too much time creating new connections.
5251

5352
- Not enough connections are available at startup.
5453
Allocate connections in the pool by setting
@@ -69,8 +68,8 @@ Tuning Your Connection Pool Settings
6968
you are using.
7069

7170
* - Database CPU usage is higher than expected. The
72-
:doc:`server logs </reference/log-messages>` or real time panel
73-
show more connection attempts than expected.
71+
server logs or real time panel show more connection attempts
72+
than expected.
7473

7574
- Decrease the :ref:`maxPoolSize <maxpoolsize-cp-setting>` or
7675
reduce the number of threads in your application. This can reduce

source/tutorial/iterate-a-cursor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Cursors Opened Within a Session
123123

124124
Starting in MongoDB 5.0 (and 4.4.8), cursors created within a
125125
:doc:`client session </core/read-isolation-consistency-recency>` close
126-
when the corresponding :doc:`server session </reference/server-sessions>`
126+
when the corresponding :ref:`server session <server-sessions>`
127127
ends with the :dbcommand:`killSessions` command, if the session times
128128
out, or if the client has exhausted the cursor.
129129

source/tutorial/restart-sharded-cluster.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Manual.
1717
This procedure demonstrates the shutdown and startup sequence for restarting
1818
a sharded cluster. Stopping or starting the components of a sharded cluster
1919
in a different order may cause communication errors between members. For
20-
example, :doc:`shard </core/sharded-cluster-shards>` servers may appear to hang
20+
example, :ref:`shard <shards-concepts>` servers may appear to hang
2121
if there are no :ref:`config servers <sharding-config-server>`
2222
available.
2323

0 commit comments

Comments
 (0)