[SERVER-64142] Add new enforceUniqueness to refineCollectionShardKey command Created: 02/Mar/22  Updated: 29/Oct/23  Resolved: 28/Mar/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.0.0-rc0, 4.4.17, 5.0.12

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-15191 [Server] Investigate changes in SERVE... Closed
Related
is related to SERVER-63732 Add new implicitlyCreateIndex and enf... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4, v4.2
Sprint: Sharding NYC 2022-03-21, Sharding NYC 2022-04-04
Participants:

 Description   

(Analogous to SERVER-63732 but for the refineCollectionShardKey command. An implicitlyCreateIndex parameter isn't relevant for refineCollectionShardKey because the command won't attempt to create an index even when the collection is empty.)

enforceUniqueness defaults to true and when set to false, ignores uniqueness property when validating indexes for refineCollectionShardKey.

Regardless of both settings, refineCollectionShardKey should still return an error if there are no index that is compatible with the new shard key pattern.



 Comments   
Comment by Githook User [ 25/Aug/22 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-64142 Add new enforceUniqueness to refineCollectionShardKey command

(cherry picked from commit 22964e1ae4dfe67e4d5e20520e6d91c9c58c105c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/dcf72568d8355d4326af801d32b86521a2144ae7

Comment by Githook User [ 23/Aug/22 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-64142 Add new enforceUniqueness to refineCollectionShardKey command

(cherry picked from commit b355fd53d1b13d217e32061c92d5ca902d6209c3)
Branch: v5.0
https://github.com/mongodb/mongo/commit/22964e1ae4dfe67e4d5e20520e6d91c9c58c105c

Comment by Githook User [ 28/Mar/22 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-64142 Add new enforceUniqueness to refineCollectionShardKey command
Branch: master
https://github.com/mongodb/mongo/commit/b355fd53d1b13d217e32061c92d5ca902d6209c3

Generated at Thu Feb 08 05:59:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.