[SERVER-21970] Callers of getLocalOplogCollection do double locking Created: 21/Dec/15 Updated: 06/Dec/22 Resolved: 06/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Backlog - Replication Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Operating System: | ALL |
| Participants: |
| Description |
|
During code inspection I noticed that getLocalOplogCollection acquires DB + collection locks and then the two callers in oplog.cpp also acquire these locks. This should be changed so that locks are acquired only once. Also, getLocalOplogCollection uses OldClientContext with the shard version check set to true (default argument). This is probably not correct either. |
| Comments |
| Comment by Judah Schvimer [ 06/Jan/20 ] |
|
Closing "Gone Away". This function was removed in https://github.com/mongodb/mongo/commit/6264d36ac6002b296aa41b8dc79400fcc2cbdd74. |
| Comment by James Wahlin [ 13/Oct/16 ] |
|
We are removing usage of OldClientContext by getLocalOplogCollection under |