Skip to content

Commit def82fc

Browse files
npentreljeff-allen-mongo
authored andcommitted
DOCS-13608: updateZoneKeyRange with hashed shard key
1 parent 7957fa8 commit def82fc

File tree

2 files changed

+68
-56
lines changed

2 files changed

+68
-56
lines changed

source/reference/command/updateZoneKeyRange.txt

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -46,61 +46,67 @@ Definition
4646
.. list-table::
4747
:header-rows: 1
4848
:widths: 20 20 80
49-
49+
5050
* - Parameter
51-
51+
5252
- Type
53-
53+
5454
- Description
55-
55+
5656
* - ``updateZoneKeyRange``
57-
57+
5858
- string
59-
59+
6060
- The namespace of the collection to associate with the range.
61-
61+
6262
The collection must be sharded for the command to succeed.
63-
64-
65-
63+
64+
65+
6666
* - ``min``
67-
67+
6868
- document
69-
69+
7070
- The inclusive lower bound of the range of :term:`shard key` values.
71-
71+
7272
Specify each field of the shard key in the form of ``<fieldname> : <value>``.
7373
The value must be of the same BSON type or types as the shard key.
74-
75-
76-
74+
75+
.. note::
76+
77+
To use hashed sharding, the field value needs to be of type
78+
:bsontype:`NumberLong <data_numberlong>`.
79+
7780
* - ``max``
78-
81+
7982
- document
80-
83+
8184
- The exclusive upper bound of the range of :term:`shard key` values.
82-
85+
8386
Specify each field of the shard key in the form of ``<fieldname> : <value>``.
8487
The value must be of the same BSON type or types as the shard key.
85-
86-
87-
88+
89+
.. note::
90+
91+
To use hashed sharding, the field value needs to be of type
92+
:bsontype:`NumberLong <data_numberlong>`.
93+
8894
* - ``zone``
89-
95+
9096
- string
91-
97+
9298
- The name of the zone to associate with the range bounded by the
9399
``min`` and ``max``.
94-
100+
95101
If the value does not match an existing zone, the command fails.
96-
102+
97103
Specify ``null`` to remove the association between the range with lower
98104
bounds of ``min`` and upper bound of ``max`` and the ``updateZoneKeyRange``
99105
collection. The values of ``min`` and ``max`` must match exactly the target
100106
range.
101-
102-
103-
107+
108+
109+
104110

105111

106112
If no zone range matches the minimum and maximum bounds passed to

source/reference/method/sh.updateZoneKeyRange.txt

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,54 +27,60 @@ Definition
2727
.. list-table::
2828
:header-rows: 1
2929
:widths: 20 20 80
30-
30+
3131
* - Parameter
32-
32+
3333
- Type
34-
34+
3535
- Description
36-
36+
3737
* - ``namespace``
38-
38+
3939
- string
40-
40+
4141
- The :term:`namespace` of the sharded collection associate with the ``zone``.
42-
42+
4343
The collection must be sharded for the operation to succeed.
44-
45-
46-
44+
45+
46+
4747
* - ``minimum``
48-
48+
4949
- document
50-
50+
5151
- The inclusive lower bound of the range of :term:`shard key` values.
52-
52+
5353
Specify each field of the shard key in the form of ``<fieldname> : <value>``.
5454
The value must be of the same BSON type or types as the shard key.
55-
56-
57-
55+
56+
.. note::
57+
58+
To use hashed sharding, the field value needs to be of type
59+
:bsontype:`NumberLong <data_numberlong>`.
60+
5861
* - ``maximum``
59-
62+
6063
- document
61-
64+
6265
- The exclusive upper bound of the range of :term:`shard key` values.
63-
66+
6467
Specify each field of the shard key in the form of ``<fieldname> : <value>``.
6568
The value must be of the same BSON type or types as the shard key.
66-
67-
68-
69+
70+
.. note::
71+
72+
To use hashed sharding, the field value needs to be of type
73+
:bsontype:`NumberLong <data_numberlong>`.
74+
6975
* - ``zone``
70-
76+
7177
- string
72-
78+
7379
- The name of the zone to associate with the range of shard key values bounded
7480
by ``minimum`` and ``maximum``.
75-
76-
77-
81+
82+
83+
7884

7985

8086
Only issue :method:`sh.updateZoneKeyRange()` when connected to a

0 commit comments

Comments
 (0)