[SERVER-50381] 3 way deadlock between applyOps cmd, prepared transaction and secondary oplog fetcher initiated find command Created: 19/Aug/20 Updated: 27/Oct/23 Resolved: 11/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Suganthi Mani | Assignee: | Backlog - Replication Team |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 65 | ||||||||||||||||||||
| Description |
|
3 way deadlock involving applyOps cmd, prepared transaction and oplog find command can occur on a primary. To be noted, 'applyOps' cmd by default runs in atomic mode. Atomic mode apply ops consisting of CRUD ops always take global lock in X mode. |
| Comments |
| Comment by Judah Schvimer [ 11/Nov/22 ] |
|
|
| Comment by Judah Schvimer [ 01/Apr/21 ] |
|
This is lower priority now that applyOps is behind a special privilege ( |
| Comment by Kaloian Manassiev [ 26/Aug/20 ] |
|
Callers in Sharding still use applyOps, yes - specifically move/split and merge. These operations definitely don't need the global X-lock, though if you want to relax that. They don't need strong locking at all. |
| Comment by Suganthi Mani [ 19/Aug/20 ] |
|
Tagging max.hirschhorn kaloian.manassiev to throw more lights from shading perspective. |
| Comment by Andy Schwerin [ 19/Aug/20 ] |
|
Does applyOps still require the global X lock? Do its callers in sharding depend on it? |