[SERVER-20084] the shell should not set slaveOk if a read preference is not set on the connection Created: 21/Aug/15 Updated: 19/Sep/15 Resolved: 25/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Querying, Shell |
| Affects Version/s: | 3.1.7 |
| Fix Version/s: | 3.1.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Adam Midvidy |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Platform 8 08/28/15 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
This code assumes the read preference mode has been set, but in some cases it is uninitialized (undefined), in which case it is not equal to "primary", so the slaveOk option is set. If a read preference is not specified, it should default to "primary". This seems to be the root cause of the linked build failure. The attached patch helped diagnose the issue, and could be useful for debugging. |
| Comments |
| Comment by Githook User [ 25/Aug/15 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |
| Comment by Githook User [ 25/Aug/15 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |