Skip to content

Commit d4156e6

Browse files
authored
DOCSP-24515 Adds Interlinks for Sharding Methods (#2473) (#2484)
* DOCSP-24515 Interlinks for Sharding Methods/Commands * Fixes typo * addShard * addShard * Interlinks addShardToZone * interlinks balancerCollectionStatus * Adds interlinks * Fixes TOC order * Adds interlinks
1 parent f101d9c commit d4156e6

33 files changed

+135
-30
lines changed

source/reference/command/abortReshardCollection.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ Definition
2929
:dbcommand:`abortReshardCollection` command, the command returns an
3030
error.
3131

32-
The :binary:`~bin.mongosh` provides a wrapper method
33-
:method:`sh.abortReshardCollection()`.
32+
33+
.. |method| replace:: :method:`sh.abortReshardCollection`
34+
helper method
35+
.. include:: /includes/fact-dbcommand-tip
36+
3437

3538
Syntax
3639
------

source/reference/command/addShard.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ Definition
1717

1818
Adds a shard replica set to a :term:`sharded cluster`.
1919

20-
Run :dbcommand:`addShard` when connected to a :binary:`~bin.mongos`
21-
instance.
20+
.. |method| replace:: :method:`sh.addShard` helper method
21+
.. include:: /includes/fact-dbcommand-tip
22+
2223

2324
Syntax
2425
------

source/reference/command/addShardToZone.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Definition
1919
the given zone. Chunks that are covered by the zone are assigned to shards
2020
associated with the zone.
2121

22+
.. |method| replace:: :method:`sh.addShardToZone` helper method
23+
.. include:: /includes/fact-dbcommand-tip
24+
2225
.. |command| replace:: ``addShardToZone``
2326

2427
You can only run :dbcommand:`addShardToZone` on the ``admin`` database

source/reference/command/balancerCollectionStatus.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Definition
2626
You can only issue the :dbcommand:`balancerCollectionStatus` against the
2727
``admin`` database.
2828

29+
.. |method| replace:: :method:`sh.balancerCollectionStatus`
30+
helper method
31+
.. include:: /includes/fact-dbcommand-tip
32+
33+
2934
Syntax
3035
------
3136

source/reference/command/balancerStart.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ Definition
1717

1818
Starts the balancer thread. The command does not wait for a
1919
balancing round to start.
20-
20+
21+
22+
.. |method| replace:: :method:`sh.startBalancer`
23+
helper method
24+
.. include:: /includes/fact-dbcommand-tip
25+
2126
.. include:: /includes/autosplit-no-operation.rst
2227

2328
In MongoDB versions earlier than 6.0, the command enables

source/reference/command/balancerStatus.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ Definition
2121
You can only issue the :dbcommand:`balancerStatus` against the
2222
``admin`` database.
2323

24+
.. |method| replace:: :method:`sh.isBalancerRunning`
25+
helper method
26+
.. include:: /includes/fact-dbcommand-tip
27+
28+
2429
Syntax
2530
------
2631

source/reference/command/balancerStop.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ Definition
2121
You can only issue the :dbcommand:`balancerStop` against the
2222
``admin`` database on a :binary:`~bin.mongos` instance.
2323

24+
25+
.. |method| replace:: :method:`sh.stopBalancer`
26+
helper method
27+
.. include:: /includes/fact-dbcommand-tip
28+
29+
2430
.. include:: /includes/autosplit-no-operation.rst
2531

2632
In MongoDB versions earlier than 6.0, the command disables

source/reference/command/commitReshardCollection.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Definition
2626
:dbcommand:`commitReshardCollection` command blocks writes early and
2727
forces the resharding operation to complete.
2828

29+
.. |method| replace:: :method:`sh.commitReshardCollection`
30+
helper method
31+
.. include:: /includes/fact-dbcommand-tip
32+
33+
2934
Syntax
3035
------
3136

source/reference/command/enableSharding.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ Definition
2424

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

27-
The :binary:`~bin.mongosh` method :method:`sh.enableSharding()`
28-
wraps the :dbcommand:`enableSharding` command.
27+
.. |method| replace:: :method:`sh.enableSharding`
28+
helper method
29+
.. include:: /includes/fact-dbcommand-tip
2930

3031
Syntax
3132
------

source/reference/command/moveChunk.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ Definition
2020
a :binary:`~bin.mongos` instance while using the :term:`admin database`.
2121
Use the following forms:
2222

23+
24+
.. |method| replace:: :method:`sh.moveChunk`
25+
helper method
26+
.. include:: /includes/fact-dbcommand-tip
27+
2328
.. code-block:: javascript
2429

2530

source/reference/command/removeShardFromZone.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Definition
1818
The :dbcommand:`removeShardFromZone` administrative command removes the
1919
association between a shard and a :term:`zone`.
2020

21+
22+
.. |method| replace:: :method:`sh.removeShardFromZone`
23+
helper method
24+
.. include:: /includes/fact-dbcommand-tip
25+
2126
.. |command| replace:: ``removeShardFromZone``
2227

2328
Syntax

source/reference/command/reshardCollection.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Definition
2020
The :dbcommand:`reshardCollection` command changes the shard key for
2121
a collection and changes the distribution of your data.
2222

23+
.. |method| replace:: :method:`sh.reshardCollection`
24+
helper method
25+
.. include:: /includes/fact-dbcommand-tip
26+
2327
Syntax
2428
------
2529

source/reference/command/shardCollection.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Definition
2626
Starting in MongoDB 6.0, sharding a collection does **not** require you to
2727
first run the :dbcommand:`enableSharding` command to configure the database.
2828

29+
.. |method| replace:: :method:`sh.shardCollection`
30+
helper method
31+
.. include:: /includes/fact-dbcommand-tip
32+
33+
2934
Syntax
3035
------
3136

source/reference/command/split.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Definition
2929

3030
The :dbcommand:`split` command must be run in the ``admin`` database.
3131

32+
.. |method| replace:: :method:`sh.splitAt` and :method:`sh.splitFind`
33+
helper methods
34+
.. include:: /includes/fact-dbcommand-tip
35+
36+
3237
Syntax
3338
------
3439

source/reference/command/updateZoneKeyRange.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ Definition
2121

2222
.. include:: /includes/extracts/zoned-sharding-updateZoneKeyRange-change.rst
2323

24+
.. |method| replace:: :method:`sh.updateZoneKeyRange`
25+
helper method
26+
.. include:: /includes/fact-dbcommand-tip
27+
28+
2429
.. |command| replace:: ``updateZoneKeyRange``
2530

2631
.. include:: /includes/fact-dbcommand.rst

source/reference/method/js-sharding.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Sharding Methods
172172
:titlesonly:
173173
:hidden:
174174

175+
/reference/method/convertShardKeyToHashed
175176
/reference/method/sh.abortReshardCollection
176177
/reference/method/sh.addShard
177178
/reference/method/sh.addShardTag
@@ -185,13 +186,13 @@ Sharding Methods
185186
/reference/method/sh.enableAutoSplit
186187
/reference/method/sh.enableSharding
187188
/reference/method/sh.getBalancerState
188-
/reference/method/sh.removeTagRange
189-
/reference/method/sh.removeRangeFromZone
190189
/reference/method/sh.help
191190
/reference/method/sh.isBalancerRunning
192191
/reference/method/sh.moveChunk
192+
/reference/method/sh.removeRangeFromZone
193193
/reference/method/sh.removeShardTag
194194
/reference/method/sh.removeShardFromZone
195+
/reference/method/sh.removeTagRange
195196
/reference/method/sh.reshardCollection
196197
/reference/method/sh.setBalancerState
197198
/reference/method/sh.shardCollection
@@ -204,4 +205,3 @@ Sharding Methods
204205
/reference/method/sh.waitForBalancerOff
205206
/reference/method/sh.waitForPingChange
206207
/reference/method/sh.updateZoneKeyRange
207-
/reference/method/convertShardKeyToHashed

source/reference/method/sh.abortReshardCollection.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Definition
2929
the :method:`sh.abortReshardCollection()` method, the method returns
3030
an error.
3131

32-
The :binary:`~bin.mongosh` method
33-
:method:`sh.abortReshardCollection()` wraps the
34-
:dbcommand:`abortReshardCollection` command.
32+
.. |dbcommand| replace:: :dbcommand:`abortReshardCollection` command
33+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
34+
3535

3636
Syntax
3737
------

source/reference/method/sh.addShard.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Definition
1818
Adds a shard replica set to a :term:`sharded cluster`. This method
1919
must be run on a :binary:`~bin.mongos` instance.
2020

21+
.. |dbcommand| replace:: :dbcommand:`addShard` command
22+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
23+
2124
The :method:`sh.addShard()` method has the following parameter:
2225

2326

@@ -63,10 +66,6 @@ Definition
6366
.. include:: /includes/note-deb-and-rpm-default-to-localhost.rst
6467

6568
.. include:: /includes/extracts/mongos-operations-wc-add-shard.rst
66-
67-
The :method:`sh.addShard()` method is a helper for the
68-
:dbcommand:`addShard` command. The :dbcommand:`addShard` command has
69-
additional options which are not available with this helper.
7069

7170
Considerations
7271
--------------

source/reference/method/sh.addShardToZone.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Definition
1919
with the given zone. Chunks that are covered by the zone are assigned to
2020
shards associated with the zone.
2121

22+
.. |dbcommand| replace:: :dbcommand:`addShardToZone` command
23+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
24+
25+
This method has the following parameter:
2226

2327
.. list-table::
2428
:header-rows: 1

source/reference/method/sh.balancerCollectionStatus.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ Definition
2323
of draining shards, zone violation or imbalance of chunks across
2424
shards.
2525

26-
The :binary:`~bin.mongosh` method
27-
:method:`sh.balancerCollectionStatus()` wraps the
28-
:dbcommand:`balancerCollectionStatus` command.
26+
.. |dbcommand| replace:: :dbcommand:`balancerCollectionStatus` command
27+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
2928

3029
Syntax
3130
------

source/reference/method/sh.commitReshardCollection.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Definition
2626
:method:`sh.commitReshardCollection()` method blocks writes early and
2727
forces the resharding operation to complete.
2828

29-
The :binary:`~bin.mongosh` method
30-
:method:`sh.commitReshardCollection()` wraps the
31-
:dbcommand:`commitReshardCollection` command.
29+
.. |dbcommand| replace:: :dbcommand:`commitReshardCollection` command
30+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
31+
3232

3333
Syntax
3434
------

source/reference/method/sh.enableSharding.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Definition
2727
The :binary:`~bin.mongosh` method :method:`sh.enableSharding()` wraps the
2828
:dbcommand:`enableSharding` command.
2929

30+
.. |dbcommand| replace:: :dbcommand:`enableSharding` command
31+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
32+
33+
3034
Syntax
3135
------
3236

source/reference/method/sh.isBalancerRunning.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Definition
1717

1818
Returns a document describing the status of the balancer.
1919

20+
21+
.. |dbcommand| replace:: :dbcommand:`balancerStatus` command
22+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
23+
2024
Output Document
2125
---------------
2226

source/reference/method/sh.moveChunk.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Definition
2525
automatically migrate :term:`chunks <chunk>`, and avoid calling
2626
:method:`sh.moveChunk()` directly.
2727

28+
.. |dbcommand| replace:: :dbcommand:`moveChunk` command
29+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
30+
2831
:method:`sh.moveChunk()` takes the following arguments:
2932

3033
.. list-table::

source/reference/method/sh.removeShardFromZone.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Definition
1818
Removes the association between a :term:`zone` and a shard.
1919

2020

21+
.. |dbcommand| replace:: :dbcommand:`removeShardFromZone` command
22+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
23+
24+
This method has the following parameters:
25+
2126
.. list-table::
2227
:header-rows: 1
2328
:widths: 20 20 80

source/reference/method/sh.reshardCollection.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Definition
2020
The :method:`sh.reshardCollection()` method changes the shard key for
2121
a collection and changes the distribution of your data.
2222

23+
.. |dbcommand| replace:: :dbcommand:`reshardCollection` command
24+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
25+
2326
:method:`sh.reshardCollection()` takes the following arguments:
2427

2528
.. list-table::

source/reference/method/sh.setBalancerState.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Description
2727
currently enabled or disabled and :method:`sh.isBalancerRunning()`
2828
to check its current state.
2929

30+
.. |dbcommand| replace:: :dbcommand:`balancerStart` and
31+
:dbcommand:`balancerStop` commands
32+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
33+
34+
3035
.. important::
3136

3237
You can only run :method:`sh.setBalancerState()` on a

source/reference/method/sh.shardCollection.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ Definition
2828
Starting in MongoDB 6.0, sharding a collection does **not** require you to
2929
first run the :method:`sh.enableSharding` method to configure the database.
3030

31-
The :binary:`~bin.mongosh` method :method:`sh.shardCollection`
32-
wraps the :dbcommand:`shardCollection` command.
31+
32+
.. |dbcommand| replace:: :dbcommand:`shardCollection` command
33+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
34+
3335

3436
:method:`sh.shardCollection()` takes the following
3537
arguments:

source/reference/method/sh.splitAt.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Definition
1717

1818
Splits a chunk at the shard key value specified by the query.
1919

20+
.. |dbcommand| replace:: :dbcommand:`split` command
21+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
22+
23+
2024
The method takes the following arguments:
2125

2226

@@ -46,12 +50,7 @@ Definition
4650
- A query document that specifies the :term:`shard key` value at which
4751
to split the chunk.
4852

49-
50-
51-
5253

53-
The :method:`sh.splitAt()` method wraps the :dbcommand:`split`
54-
command.
5554

5655
Consideration
5756
-------------

source/reference/method/sh.splitFind.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Definition
2020
creates two roughly equal chunks. To split a chunk at a specific
2121
point instead, see :method:`sh.splitAt()`.
2222

23+
.. |dbcommand| replace:: :dbcommand:`split` command
24+
.. include:: /includes/fact-mongosh-shell-method-alt.rst
25+
2326
The method takes the following arguments:
2427

2528

0 commit comments

Comments
 (0)