[SERVER-45626] Consistent Oplog Locking Rules Created: 13/Jan/20 Updated: 29/Oct/23 Resolved: 13/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0, 4.4.2 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | PM Bot | Assignee: | Lingzhi Deng |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | former-quick-wins | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||||||||||
| Sprint: | Repl 2020-03-09, Repl 2020-03-23 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 23 | ||||||||||||||||||||||||||||
| Description |
|
In principle we should only need the Global IS/IX lock to read/write the oplog. However, see SERVER-44906, we're inconsistent. Furthermore, there are cases our code requires a DB and Collection lock in order to get a Collection pointer to the oplog, although this is not fundamentally necessary. Inconsistent locking invites mistakes: deadlocks, race conditions, and unnecessary waiting. |
| Comments |
| Comment by Githook User [ 14/Sep/20 ] |
|
Author: {'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}Message: validate command on the oplog collection (cherry picked from commit c15e8ae74071482d69179c7e5e5e6bdc882d2beb) |
| Comment by Tess Avitabile (Inactive) [ 14/Sep/20 ] |
|
Sounds good to me! |
| Comment by Lingzhi Deng [ 11/Sep/20 ] |
|
Ah I see. In that case, yes, we can schedule a backport I guess. Feel free to request one and we can put it in the execution sprint then. CC tess.avitabile any objections? |
| Comment by Louis Williams [ 11/Sep/20 ] |
|
Yes,
Correct. Your commit landed only a week after the 4.4 branch (on Mar 4), so it seems possible that this isn't extremly risky to put into 4.4. |
| Comment by Lingzhi Deng [ 11/Sep/20 ] |
|
Why does |
| Comment by Louis Williams [ 11/Sep/20 ] |
|
lingzhi.deng I'm trying to backport |
| Comment by Githook User [ 13/Mar/20 ] |
|
Author: {'username': 'ldennis', 'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com'}Message: |