Skip to content

Commit a178d3f

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-23926 Shard key requirement (BACKPORT) (#1520)
* DOCS-15333-dbhash-locking (#1473) Co-authored-by: jason-price-mongodb <[email protected]> * DOCS-15333-dbhash-locking * DOCS-15333-dbhash-locking * DOCS-15333-dbhash-locking * DOCSP-23926 shard key requirement (#1513) * DOCSP-23926-shard-key-requirement * DOCSP-23926-shard-key-requirement * DOCSP-23926-shard-key-requirement * DOCSP-23926-shard-key-requirement * DOCSP-23926-shard-key-requirement Co-authored-by: jason-price-mongodb <[email protected]> Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 26abb5c commit a178d3f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

source/core/sharding-reshard-a-collection.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,18 @@ requirements:
6161
If your application has time periods with less traffic, reshard your
6262
collection during that time if possible.
6363

64-
- You have rewritten your application code to update your queries to use
65-
**both** the current shard key and the new shard key.
64+
- You must perform one of these tasks:
65+
66+
- rewrite your application's queries to use **both** the current shard
67+
key and the new shard key
68+
69+
- stop your application and then:
70+
71+
- rewrite your application's queries to use the new shard key
72+
- wait until the resharding of the collection completes (to monitor
73+
the :ref:`resharding process <resharding_process>`, use a
74+
:pipeline:`$currentOp` pipeline stage)
75+
- deploy your rewritten application
6676

6777
The following queries return an error if the query filter does not
6878
include **both** the current shard key or a unique field (like

0 commit comments

Comments
 (0)