[SERVER-36407] Use AutoCollection instead of AutoCollectionForRead Created: 01/Aug/18 Updated: 04/Sep/18 Resolved: 13/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Mark Benvenuto |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 63 | ||||||||||||
| Description |
|
Free Monitoring uses AutoCollectionForRead, unfortunately using this class can cause a deadlock with replication during startup. The deadlock can occurs because two the collection MODE_IS lock and _mutex in ReplicationCoordinatorImpl are taken in different orders The ReplicationCoordinatorImpl::_finishLoadLocalConfig method takes the {{_mutex first and then MODE_IS lock while AutoCollectionForRead takes it in the opposite order. A simple fix is to switch to AutoCollection since free monitoring does not need to wait for changes to replicate when it polls the local admin database on the primary or secondary. |
| Comments |
| Comment by Mark Benvenuto [ 13/Aug/18 ] |
|
Closing as won't fix since |