[SERVER-30450] in shardCollection, get UUID from shard only after validating or creating indexes, to ensure collection exists on shard Created: 01/Aug/17  Updated: 01/Aug/17  Resolved: 01/Aug/17

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

Type: Bug Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-08-21
Participants:

 Description   

This means we'll have to call listCollections twice on the primary shard if we want to avoid shardCollection being able to fail after creating the collection on the shard. We should avoid this because the user may change the options to shardCollection to try to fix their issue, and the new options may be incompatible with the options the collection was just created with. For example, if the first (failed) shardCollection attempt specified one shard key and passed the 'unique' option, and the second attempt specifies a different shard key, the second attempt will fail because a unique index was created on the shard with the first key.

Depends on SERVER-29858, since we don't want to add new uses of DBClient in sharding, but ShardRemote does not have a way to iterate a cursor on shards.



 Comments   
Comment by Esha Maharishi (Inactive) [ 01/Aug/17 ]

Will be done as part of SERVER-29760.

Generated at Thu Feb 08 04:23:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.