The method DBTCPConnector#call incorrectly deals with read preferences when:
- The read-preference on the DB or Mongo has been set to (the deprecated) ReadPreference.PRIMARY
- The options on the collection or query have been set to include Bytes#QUERYOPTION_SLAVEOK
The beginning of the method tests the passed readPref against ReadPreference.primary() using object equality, so the inferred use of ReadPreference.secondaryPreferred() for slaveOk queries is not triggered.
The default read preference on the mongo is ReadPreference.primary() in the v2.9.0 dist, so this bug only affects code written against older releases that explicitly set ReadPreference.PRIMARY at some point.