[SERVER-14032] v2.6 mongos doesn't verify _id is present for config server upserts Created: 22/May/14  Updated: 11/Jul/16  Resolved: 06/Jun/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.6.1
Fix Version/s: 2.6.4, 2.7.2

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-14209 disallow non-equality _id upserts to ... Closed
Tested
Operating System: ALL
Backport Completed:
Participants:

 Description   
Issue Status as of Jul 22, 2014

ISSUE SUMMARY
In a sharded cluster, mongos does not verify that the _id field is present for upserts to multiple config servers. This can lead to inconsistent _id fields on different config servers if the id is not explicitly provided.

USER IMPACT
Manipulating config metadata manually via a mongos may lead to inconsistent config servers and unexpected behavior in the sharded system. Metadata changes via normal command operations (shardCollection, balance, split, move, and merge) are not affected.

WORKAROUNDS
Always ensure that any manual upserts of config metadata (including data in the "admin" database) contain an equality match on the _id value for the query portion of the upsert.

AFFECTED VERSIONS
All production releases since version 2.6.0 are affected by this issue.

FIX VERSION
The fix is included in the 2.6.4 production release.

RESOLUTION DETAILS
Checks were implemented to prevent upserts without valid _id in the query part of the upsert.

Original description

This can lead to mismatched _ids on documents - client code should not use this behavior (2.4 disallows) but it should also be illegal in v2.6.



 Comments   
Comment by Githook User [ 16/Jul/14 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-14032 verify _id present for upserts to multiple config servers
(cherry picked from commit 108ec7640743a97d2e02a081ef16d0c4da748c67)
Branch: v2.6
https://github.com/mongodb/mongo/commit/d66794ceb55fe8c2aaefb29246f907a82069a676

Comment by Githook User [ 05/Jun/14 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-14032 verify _id present for upserts to multiple config servers
Branch: master
https://github.com/mongodb/mongo/commit/108ec7640743a97d2e02a081ef16d0c4da748c67

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