[SERVER-14209] disallow non-equality _id upserts to config servers Created: 09/Jun/14  Updated: 19/Oct/15  Resolved: 19/Oct/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Greg Studer Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-14032 v2.6 mongos doesn't verify _id is pre... Closed
Operating System: ALL
Participants:

 Description   

It is possible to upsert a document with differing _ids on different config servers if the upsert is of the form:

db.coll.update({ _id : { $gt : 1 }, user : 1 }, { $set : { user : 1 } }, { upsert : 1 })

The _id field is present as an expression in the query, so _ids are still autogenerated on upsert. This form should probably just be disallowed to configs.



 Comments   
Comment by Andy Schwerin [ 19/Oct/15 ]

This behavior is not problematic with CSRS (SERVER-1448) config servers.

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