Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replica set not configured when read preference is secondary #166

Open
linearb opened this issue Apr 27, 2016 · 1 comment
Open

replica set not configured when read preference is secondary #166

linearb opened this issue Apr 27, 2016 · 1 comment

Comments

@linearb
Copy link

linearb commented Apr 27, 2016

When making a connection with read preference secondary, it does not correctly track
the replicaset members in __allnodes. The problem seems to be that the task looping call
to _Connection.configure() only runs once because it throws an AutoReconnect exception
on line 136 the first time it is called. However, at least in the environment I tested, the first
(and only) run of the task looping call happens before the connection is made.

@IlyaSkriblovsky
Copy link
Contributor

IlyaSkriblovsky commented Apr 27, 2016

This seems like a legacy behavior from ancient times when ismaster was only used to check if node is primary or secondary. Later configure was modified to extract all node addresses from ismaster response, but condition under that configure is called was not modified. This needs to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants