Setup is 3 node replica-set consisting of
1 Primary, 1 Secondary, 1 Arbiter.
Setting `w=2` and `read_preference=pymongo.ReadPreference.NEAREST` results in getting wrong results to queries occasionally.
See attached example program. Output from the program on my system is:
python pymongo_bug.py
found 1 docs
found 0 docs WHICH IS WRONG
found 0 docs WHICH IS WRONG
found 4 docs
found 0 docs WHICH IS WRONG
found 6 docs
found 7 docs
...
Setting read_preference to Primary or Secondary solves the problem.
- is duplicated by
-
PYTHON-931 pymongo tries to login at arbiter and fails
- Closed