[SERVER-25628] FileAllocator::get not thread-safe Created: 16/Aug/16  Updated: 25/Jan/17  Resolved: 23/Aug/16

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

Type: Bug Priority: Major - P3
Reporter: Jianghua Yang Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2016-08-29
Participants:

 Description   

FileAllocator* FileAllocator::get() {
    if (!_instance)
        _instance = new FileAllocator();
    return _instance;
}

_instance must protect by mutex , or directly assign by new FileAllocator.



 Comments   
Comment by Githook User [ 23/Aug/16 ]

Author:

{u'name': u'jianghua.yjh', u'email': u'jianghua.yjh@alibaba-inc.om'}

Message: SERVER-25628 make FileAllocator::get() thread-safe

Signed-off-by: Andy Schwerin <schwerin@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/4debb625a6fcee351f6e2508dbe2c67709ec3427

Comment by Ramon Fernandez Marina [ 17/Aug/16 ]

Thanks for taking the time to create a pull request yjhjstz, we've dispatched this to an engineer in the team for review. Please continue to watch this ticket for further comments/instructions.

Regards,
Ramón.

Comment by Jianghua Yang [ 16/Aug/16 ]

https://github.com/mongodb/mongo/pull/1107

Generated at Thu Feb 08 04:09:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.