[SERVER-2066] Can't shard a collection with an existing unique index. Error message not helpfull Created: 05/Nov/10 Updated: 06/Dec/22 Resolved: 25/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | laurent laborde | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Sharding
|
| Participants: |
| Description |
|
1) create a collection with a unique index (i created web.explorer with a unique index on "ip") > db.runCommand( { addshard : "xxx.xxx.xxx.xxx:27018" }); { "shardAdded" : "shard0000", "ok" : 1 }> db.runCommand( {"enablesharding" : "web"}) { "ok" : 1 }> db.runCommand({"shardcollection" : "web.explorer", "key" : {"_id" : 1}}) This message "wrong type for BSONElement (unique) 1 != 8" should me more helpfull. thank you. |