[SERVER-3586] Array as shard key value should be prohibited. Created: 12/Aug/11 Updated: 11/Jul/16 Resolved: 16/Aug/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 1.9.1 |
| Fix Version/s: | 1.9.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kyle Banker | Assignee: | Greg Studer |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Suppose you have a sharded cluster with a shard key, n. Suppose further that shard 1 holds the range 1-100 and shard 2 has the range 100-infinity. It's now possible to insert: db.col.insert( {n: [1, 2]}) But the query: db.col.find( {n: 1}) Will not return the just-inserted document. The original insert of the array should fail. |
| Comments |
| Comment by Mathias Stearn [ 16/Aug/11 ] |
|
Already done for 1.9.2. https://github.com/mongodb/mongo/commit/6bf06f44 |