Details
-
Bug
-
Resolution: Done
-
Major - P3
-
1.9.2
Description
C# Driver: 1.9.2
MongoDB: 2.6.5
Sharded Cluster w/ Replicas
var cursor = m_RecipientCollection.FindAs<BsonDocument>(q)
|
.SetFields(fields)
|
.SetSkip(offset)
|
.SetLimit(limit)
|
.SetSortOrder(SortBy.Descending(UserAttrId.Timestamp))
|
.SetReadPreference(ReadPreference.SecondaryPreferred);
|
total = cursor.Count();
|
The above specifies a Read Preference of Secondary Preferred, yet the count command is sent to the primary, even when there's a perfectly responsive Secondary about, as proven by iterating cursor built the same way running against the secondary.