[SERVER-42391] Verify the uniqueness property of a shard key cannot be changed by a shard key refine Created: 24/Jul/19  Updated: 29/Oct/23  Resolved: 29/Jul/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: James Heppenstall (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-07-29, Sharding 2019-08-12
Participants:

 Description   

When a collection is sharded, a user can provide the "unique" option, which if true will ensure there exists an index with a uniqueness constraint with the same pattern as the proposed shard key. A user is not able to modify this property when refining a shard key, and this should be verified by inspecting the config.collections entry for both a unique=true and unique=false sharded collection after refining its shard key.



 Comments   
Comment by Githook User [ 29/Jul/19 ]

Author:

{'name': 'Jamie Heppenstall', 'username': 'JamesHeppenstall', 'email': 'jamie.heppenstall@mongodb.com'}

Message: SERVER-42391 Add jstests verifying the uniqueness property of a shard key cannot be changed by refineCollectionShardKey
Branch: master
https://github.com/mongodb/mongo/commit/541d147e1b15e7d1f7b652a9232c9e3ee3765597

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