[SERVER-4502] No chunk splits when using findAndModify() to upsert Created: 15/Dec/11  Updated: 11/Jul/16  Resolved: 17/Apr/12

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 1.8.4, 2.0.1, 2.0.2, 2.0.3
Fix Version/s: 2.1.1

Type: Bug Priority: Major - P3
Reporter: Tyler Brock Assignee: Brandon Diamond
Resolution: Done Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File findAndModifyUpsertBug.js    
Issue Links:
Depends
Operating System: ALL
Participants:

 Description   

Doing upserts on a sharded collection via a findAndModify will not initiate chunk splits (and subsequent balancing).

I've attached a javascript file that shows the correct behavior for a regular upsert and reproduces the bug behavior for a findAndModify upsert.

Before running, please start a sharded cluster using the mongo snippet with chunksize=1 or increase n.



 Comments   
Comment by auto [ 17/Apr/12 ]

Author:

{u'login': u'', u'name': u'Brandon Diamond', u'email': u'brandon@10gen.com'}

Message: SERVER-4502: sharded findAndModify now checks for splits
Branch: master
https://github.com/mongodb/mongo/commit/2526f0d8144d211187fb1571e33f24f32aa64d2e

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