[SERVER-46334] Eliminate the mutex held across JournalListener accesses Created: 22/Feb/20 Updated: 29/Oct/23 Resolved: 25/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Dianna Hohensee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Execution Team 2020-02-24, Execution Team 2020-03-09 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
waitUntilDurable currently holds a mutex across calls to JournalListener::getToken and JournalListener::onDurable calls. The mutex does not appear necessary for the JournalListener functions. The mutex appears to be for accessing the _journalListener because it can be asynchronously set by another caller via the setJournalListener function on the class. Removing the mutex will allow the existing promises in the code comments to become true, which are not currently true because the mutex serializes callers. Furthermore, I need to add a write in getToken for the Replicate Before Journaling project, and I don't want to take a mutex before collection locks: removing the mutex simplifies the code changes. |
| Comments |
| Comment by Githook User [ 25/Feb/20 ] |
|
Author: {'name': 'Dianna Hohensee', 'username': 'DiannaHohensee', 'email': 'dianna.hohensee@mongodb.com'}Message: delete mode 100644 src/mongo/db/storage/journal_listener.cpp |