[SERVER-19846] Remove existing usages of timed_mutex and disallow new uses Created: 10/Aug/15 Updated: 19/Sep/15 Resolved: 24/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.8 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Platform 8 08/28/15 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
We have had two non-trivial issues related to std::timed_mutex, see We should remove all existing usages of std::timed_mutex and disallow novel usages. For situations where we must use timed_mutex, we should use boost::timed_mutex under NOLINT. |
| Comments |
| Comment by Githook User [ 24/Aug/15 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Andy Schwerin [ 10/Aug/15 ] |
|
The timed_mutex was actually moved from authz_manager_external_state_d.h/cpp when we restructured the user management commands to not require the distributed lock on mongos. In so doing, we actually made the timed_mutex safe to replace with a stdx::mutex, dropping the timeout. We only had the lock acquisition time limit because we needed it for the distributed lock variant, and it was easier to have symmetry in the two implementations. |
| Comment by Andreas Nilsson [ 10/Aug/15 ] |
|
The use of timed_mutex in user_management_commands.cpp was added pretty recently by alabid in https://github.com/mongodb/mongo/commit/b631186c3bde82f4894b31b58c769a9e83453601#diff-f587ec891abd60f174b15c8b985802a5 I'd have to refer to spencer or schwerin to answer if it/how it can be removed. |