[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:
Depends
is depended on by SERVER-44555 Implement replicate before journaling Closed
Related
related to SERVER-80432 waitForSession can miss JournalListen... Closed
related to SERVER-80657 clean up JournalListener access in Wi... Closed
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: SERVER-46334 Eliminate the mutex held across JournalListener calls.

delete mode 100644 src/mongo/db/storage/journal_listener.cpp
Branch: master
https://github.com/mongodb/mongo/commit/61ea39197455ca2e54135607e5625bb2c2796ec3

Generated at Thu Feb 08 05:11:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.