[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:
Duplicate
is duplicated by SERVER-3608 Sharding on geo sometimes fails due t... Closed
is duplicated by SERVER-2941 shouldn't be able to have an array be... Closed
Related
related to SERVER-2065 Sharding on arrays Closed
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

Generated at Thu Feb 08 03:03:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.