[SERVER-13552] remove unnecessary global lock during "replace" out action Created: 11/Apr/14 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Jianbin Wei | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 8 |
| Labels: | pull-request, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
During map-reduce operation there are unnecessary global lock used and should be removed. |
| Comments |
| Comment by Andre Spiegel [ 27/Apr/14 ] | |||||||||||||||||
|
Just so it doesn't get lost in the duplicate ticket ( | |||||||||||||||||
| Comment by Mathias Stearn [ 25/Apr/14 ] | |||||||||||||||||
|
There is a potential solution in the pull request attached to SERVER-7831 | |||||||||||||||||
| Comment by Jianbin Wei [ 11/Apr/14 ] | |||||||||||||||||
|
Also in the same mr.cpp file, there are three TODO list about global lock
In theory I don't see why global lock is needed in these cases. We use map reduce extensively and these issues make the whole system slow. I think mongodb should seriously minimize the usage of global lock. | |||||||||||||||||
| Comment by Jianbin Wei [ 11/Apr/14 ] | |||||||||||||||||
|
Sorry it is during "replace" action. mr.cpp:545
I am not sure about the checking for safeCount. In our case we are replacing a new temporary collection and it generates a global lock. We have to insert a dummy document into the temp collection and filter it out manually to workaround the global lock. |