[SERVER-10006] Secondary read pref with tag can end up selecting no nodes on retry Created: 24/Jun/13 Updated: 11/Jul/16 Resolved: 25/Jun/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
Example case: 2 node replica set: secondary tag: { dc: 'ny' }read pref setting: ] If the secondary was down and the went up again, the replica set connection object will attempt to select nodes again (since the first try gave us nothing due to the node being down and marked as bad). However, the iterator for the tag was already moved on the first attempt and the retry would end up not checking the nodes because it already depleted the tags on the first attempt. |
| Comments |
| Comment by auto [ 25/Jun/13 ] | |||||||||||
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Added more descriptive comments for the tests. | |||||||||||
| Comment by auto [ 25/Jun/13 ] | |||||||||||
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Reset the TagSet iterator to point to initial position before attempting to retry node selection logic. | |||||||||||
| Comment by Randolph Tan [ 24/Jun/13 ] | |||||||||||
|
Note: this is also the cause for the buildbot failure (log attached). Here's the excerpt for the failure:
Easiest way to reproduce is to modify the binary such that the ReplicaSetMonitorWatcher thread will never be created. |