[SERVER-6493] Inserting array value for non-shard-key field used in prefix shard key index succeeds Created: 17/Jul/12  Updated: 15/Aug/12  Resolved: 15/Aug/12

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Sharding
Affects Version/s: 2.1.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6095 make multikey indices useful for shar... Closed
Related
related to SERVER-1506 when sharding on a and need an index ... Closed
Operating System: ALL
Participants:

 Description   

If you have an index on A,B and shard on A, inserting array values for B succeeds. The discussion in SERVER-1506 suggests that this can cause problems.



 Comments   
Comment by Kevin Matulef [ 23/Jul/12 ]

This is the intended behavior, for now, until multikey indexes are supported for sharding. You are allowed to insert multikey values for B, you just won't be able to use the index for splitting/migrating if you do that. You can recover from this state by creating an index on the shard key.

The solution to this is to support multikey indexes, see SERVER-6095.

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