[SERVER-79810] make JournalFlusher::waitForJournalFlush() interruptible when waiting for write concern Created: 07/Aug/23 Updated: 01/Feb/24 Resolved: 10/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Shin Yee Tan | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v7.0
|
||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | The deadlock is outlined here but I've copy and pasted it for ease:
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution NAMR Team 2023-08-21 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 120 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When stepping down, we want caller threads to be able to know that the journal flusher was interrupted. Otherwise, we can get into a deadlock. Areas that may need to be addressed:
We should add a test for this deadlock so we can confirm fixing it and catching it early if it happens again. |
| Comments |
| Comment by Githook User [ 19/Dec/23 ] |
|
Author: {'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}Message: Revert " This reverts commit 8b8982cee48b0e3714a2fe19faeea78ec4dce409. GitOrigin-RevId: d5e4ea2a8e73749fa392eb33ac2ede666e815425 |
| Comment by Githook User [ 19/Dec/23 ] |
|
Author: {'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}Message: Revert " This reverts commit dc048a80c300f108e20018283edd2ad01854cbc1. GitOrigin-RevId: 0abf7713d8e0a5d628d6880263688d9e073ebcef |
| Comment by Githook User [ 19/Dec/23 ] |
|
Author: {'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}Message: Revert " This reverts commit 812b333ab2e6eb10c3194a51b27c1846fa5272e9. GitOrigin-RevId: 36190d3d80f0e06935ff74fcde7f629d4c6f2b83 |
| Comment by Githook User [ 13/Dec/23 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit a0c9b5ca2b4cd85677b1ceecb2f2bb68d6b92322) GitOrigin-RevId: 812b333ab2e6eb10c3194a51b27c1846fa5272e9 |
| Comment by Githook User [ 13/Dec/23 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: The default behavior is for this operation to be uninterruptible. Callers (cherry picked from commit d9b8636c499426bde024f3ebc04fdcc78349ee05) GitOrigin-RevId: dc048a80c300f108e20018283edd2ad01854cbc1 |
| Comment by Githook User [ 13/Dec/23 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: The JournalFlusher background thread absorbs interruption errors and will (cherry picked from commit 56fc93b5c302acf3b5db78477e1533dc2ef08cfe) GitOrigin-RevId: 8b8982cee48b0e3714a2fe19faeea78ec4dce409 |
| Comment by Benety Goh [ 11/Aug/23 ] |
|
Changing title because the merged changes do not quite match the current ticket descripton/title. The background thread in the JournalFlusher will continue restart its loop on receiving any interruptions. It will not forward these interruptions to callers waiting in JournalFlusher::waitForJournalFlush(). Threads blocked on JournalFlusher::waitForJournalFlush() may now provide an Interruptible instance (OperationContext for example) that may be used to wake the thread up and unblock the waitForJournalFlush(). Currently, the only scenario where we opt into this behavior is in waitForWriteConcern(). OLD TITLE: Allow journal flusher to signal interruptions to callers |
| Comment by Githook User [ 10/Aug/23 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 09/Aug/23 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: The default behavior is for this operation to be uninterruptible. Callers |
| Comment by Githook User [ 09/Aug/23 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: The JournalFlusher background thread absorbs interruption errors and will |