[SERVER-7831] m/r: reduce post processing: reduce lock time with "nonAtomic" option Created: 04/Dec/12  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: MapReduce
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Azat Khuzhin Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 3
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File pr333_rebase_353dccc.diff     File pr333_rebase_81ed239.diff    
Issue Links:
Duplicate
is duplicated by SERVER-13748 Global Lock in Reduce Phase of Map/Re... Closed
Related
is related to SERVER-13552 remove unnecessary global lock during... Backlog
Assigned Teams:
Query Execution
Participants:

 Description   

Merge too many documents, can take a long period of time,
and all of this time there is a global lock, we can avoid this,
with "

{nonAtomic: true}

" option.

This patch do this.



 Comments   
Comment by Benety Goh [ 10/Jul/14 ]

Attached file containing pull request changes rebased on 81ed23939d7b94a14371241db247a76e85f050fe

Comment by Benety Goh [ 10/Jul/14 ]

SERVER-13522 referred to the "replace" action while this one's about "reduce".

Comment by Brent Miller [ 07/Jun/13 ]

We think we've been affected by this issue, and just wanted to comment on how this effects performance.

When the server enters the "M/R Reduce Post Processing" stage, the global lock will shoot to 100%, rendering the primary almost completely useless – queries time out, replica secondaries will fall behind, and the insert rate will drop dramatically.

This more or less makes the out:

{reduce: "collName"}

map reduce option impractical to use in a production environment.

I asked about this on the mongodb-users group not too long ago. If it provides any useful background information, the post can be found here.

Comment by Azat Khuzhin [ 10/Mar/13 ]

Any news?

Comment by Azat Khuzhin [ 04/Dec/12 ]

Pull request - https://github.com/mongodb/mongo/pull/333

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