[SERVER-818] DatabaseHolder mutex issues Created: 23/Mar/10  Updated: 12/Jul/16  Resolved: 23/Mar/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.0

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

isLoaded() and get() require a read lock only, but they call operator[] on _paths, which is a write operation. Since c++ maps are not thread-safe, this could cause memory corruption. The read-only members of DatabaseHolder should be made const functions if they can truly be implemented as read-only. (This would make accessing _paths.operator[] a compile error.)



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Apr/10 ]

in a release

Comment by auto [ 23/Mar/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: better thread safety for DatabaseHolder SERVER-818
http://github.com/mongodb/mongo/commit/5e78c52f1b03fa2d7079a227285f927b4756c1b2

Generated at Thu Feb 08 02:55:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.