Skip to content

Commit 5c90c28

Browse files
DOCS-16222 Removed unused parameter from sh.removeTagRange() (#4973) (#5125)
* Removed unused parameter from sh.removeTagRange() * Removed self references * Some PR feedback * External review feedback
1 parent 7b02741 commit 5c90c28

File tree

4 files changed

+17
-40
lines changed

4 files changed

+17
-40
lines changed

source/includes/steps-sharding-segmenting-data-by-location-update.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ action:
4444
* The full namespace of the target collection.
4545
* The inclusive lower bound of the range.
4646
* The exclusive upper bound of the range.
47-
* The name of the zone.
4847
4948
language: javascript
5049
code: |
5150
sh.removeTagRange(
5251
"chat.messages",
5352
{ "country" : "UK", "userid" : MinKey },
5453
{ "country" : "UK", "userid" : MaxKey }
55-
"EU"
5654
)
5755
---
5856
stepnum: 4

source/includes/steps-sharding-tiered-hardware-for-varying-slas-update.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ action:
2929
* the full namespace of the target collection.
3030
* the inclusive lower bound of the range.
3131
* the exclusive upper bound of the range.
32-
* the zone.
3332
3433
language: javascript
3534
code: |
3635
sh.removeTagRange(
3736
"photoshare.data",
3837
{ "creation_date" : ISODate("2016-01-01") },
39-
{ "creation_date" : MaxKey },
40-
"recent"
38+
{ "creation_date" : MaxKey }
4139
)
4240
- pre: |
4341
Remove the old ``archive`` zone range using the
@@ -46,15 +44,13 @@ action:
4644
* the full namespace of the target collection.
4745
* the inclusive lower bound of the range.
4846
* the exclusive upper bound of the range.
49-
* the zone.
5047
5148
language: javascript
5249
code: |
5350
sh.removeTagRange(
5451
"photoshare.data",
5552
{ "creation_date" : MinKey },
56-
{ "creation_date" : ISODate("2016-01-01") },
57-
"archive"
53+
{ "creation_date" : ISODate("2016-01-01") }
5854
)
5955
post: |
6056
:bsontype:`MinKey` and :bsontype:`MaxKey` are reserved special values for

source/reference/method/sh.removeRangeFromZone.txt

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Definition
2020
Removes the association between a range of shard key values and a
2121
:term:`zone`.
2222

23-
:method:`sh.removeRangeFromZone()` takes the following arguments:
23+
``sh.removeRangeFromZone()`` takes the following fields:
2424

2525

2626
.. list-table::
@@ -62,25 +62,22 @@ Definition
6262

6363
Specify each field of the shard key in the form of ``<fieldname> : <value>``.
6464
The value must be of the same BSON type or types as the shard key.
65-
66-
67-
6865

6966

70-
Use :method:`sh.removeRangeFromZone()` to remove the association between
71-
unused, out of date, or conflicting ranges and a zone.
67+
Use ``sh.removeRangeFromZone()`` to remove the association between
68+
unused, out of date, or conflicting shard key ranges and a zone.
7269

7370
If no range matches the minimum and maximum bounds passed to
74-
:method:`~sh.removeShardFromZone()`, nothing is removed.
71+
``sh.removeRangeFromZone()``, nothing is removed.
7572

76-
Only issue :method:`sh.removeTagRange()` when connected to a
73+
Only run ``sh.removeRangeFromZone()`` when connected to a
7774
:binary:`~bin.mongos` instance.
7875

7976
Behavior
8077
--------
8178

82-
:method:`sh.removeShardFromZone()` does not remove the zone associated to the
83-
specified range.
79+
``sh.removeRangeFromZone()`` doesn't remove the association between
80+
a zone and a shard. It also doesn't remove the zone itself.
8481

8582
See the :ref:`zone <zone-sharding>` manual page for more information on zones
8683
in sharded clusters.
@@ -114,11 +111,10 @@ must authenticate as either:
114111
or, alternatively
115112

116113
- a user whose privileges include :authaction:`enableSharding` on the
117-
:ref:`cluster <resource-specific-collection>` resource (available
118-
starting in version 4.2.2, 4.0.14, 3.6.16).
114+
:ref:`cluster <resource-specific-collection>` resource.
119115

120116
The :authrole:`clusterAdmin` or :authrole:`clusterManager` built-in roles have
121-
the appropriate permissions for issuing :method:`sh.removeRangeFromZone()`.
117+
the appropriate permissions for running ``sh.removeRangeFromZone()``.
122118
See the documentation page for :ref:`Role-Based Access Control
123119
<authorization>` for more information.
124120

@@ -154,7 +150,7 @@ specifies ``{ a : 0 }`` as the ``min`` bound:
154150

155151
While the range of ``{ a : 0 }`` and ``{ a : 10 }`` encompasses the existing
156152
range, it is not an exact match and therefore
157-
:method:`sh.removeRangeFromZone()` does not remove anything.
153+
``sh.removeRangeFromZone()`` does not remove anything.
158154

159155
Compound Shard Key
160156
~~~~~~~~~~~~~~~~~~
@@ -173,5 +169,5 @@ bound of ``{ a : 1, b : 1}`` and an upper bound of ``{ a : 10, b : 10 }``:
173169
Given the previous example, if there was an existing range with a lower bound
174170
of ``{ a : 1, b : 5 }`` and an upper bound of ``{ a : 10, b : 1 }``, the
175171
operation would *not* remove that range, as it is not an exact match of the
176-
minimum and maximum passed to :method:`sh.removeRangeFromZone()`.
172+
minimum and maximum passed to ``sh.removeRangeFromZone()``.
177173

source/reference/method/sh.removeTagRange.txt

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sh.removeTagRange()
1313
Definition
1414
----------
1515

16-
.. method:: sh.removeTagRange(namespace, minimum, maximum, tag)
16+
.. method:: sh.removeTagRange(namespace, minimum, maximum)
1717

1818
.. |method| replace:: :method:`sh.removeRangeFromZone()`
1919

@@ -58,24 +58,12 @@ Definition
5858
- The maximum value of the shard key range from the tag.
5959
Specify the maximum value in the form of ``<fieldname>:<value>``. This
6060
value must be of the same BSON type or types as the shard key.
61-
62-
63-
64-
* - ``tag``
65-
66-
- string
67-
68-
- The name of the tag attached to the range specified by the ``minimum``
69-
and ``maximum`` arguments to.
70-
71-
72-
7361

7462

75-
Use :method:`sh.removeShardTag()` to ensure that unused or out of
63+
Use ``sh.removeTagRange()`` to ensure that unused or out of
7664
date ranges are removed and hence chunks are balanced as required.
7765

78-
Only issue :method:`sh.removeTagRange()` when connected to a
66+
Only run ``sh.removeTagRange()`` when connected to a
7967
:binary:`~bin.mongos` instance.
8068

8169
Example
@@ -88,6 +76,5 @@ removes an existing tag range covering zip codes in New York State:
8876

8977
sh.removeTagRange( "exampledb.collection",
9078
{ state: "NY", zip: MinKey },
91-
{ state: "NY", zip: MaxKey },
92-
"NY"
79+
{ state: "NY", zip: MaxKey }
9380
)

0 commit comments

Comments
 (0)