[SERVER-11120] Enforce correct shard key for inserts on shard Created: 10/Oct/13  Updated: 10/Dec/14  Resolved: 10/Oct/13

Status: Closed
Project: Core Server
Component/s: Sharding, Storage, Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: shardVersion
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Currently mongos validates that the shard key as it sends data to the shard but the shard doesn't ensure that the shard key value is correct for itself. It is possible that a bug in routing could cause a document to be sent to a shard that is incorrect and the shard will not have an error (allowing the insert).

This enforcement should only apply to sharded connections so that maintenance and admin work can be done directly to the shard.

If this is done this should also be applied to inserts on updates (upsert:true case) as well.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 10/Oct/13 ]

This is what versioning is for, which is a much more robust generic system.

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