[SERVER-8374] Mongos incorrectly parses read preference spec with $query syntax Created: 29/Jan/13  Updated: 11/Jul/16  Resolved: 07/Feb/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.0-rc0
Fix Version/s: 2.4.0-rc1

Type: Bug Priority: Major - P3
Reporter: Christian Amor Kvalheim Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

{'$query':

{test:1}

, '$readPreference':{mode:'secondary', tags: [

{dc:'sf',s:"1"}

,

{dc:'ma',s:"2"}

]}}

Fails on 2.2 via mongos due to non-matching tags, returning an error. Returns documents on 2.4.0-rc0-pre.



 Comments   
Comment by auto [ 07/Feb/13 ]

Author:

{u'date': u'2013-01-30T23:25:22Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-8374 Mongos incorrectly parses read preference spec with $query syntax
Branch: master
https://github.com/mongodb/mongo/commit/cd3b792af9effb43cc9d6982d7ca49339778a10a

Comment by Christian Amor Kvalheim [ 30/Jan/13 ]

It's a driver test so that could be why as it's on a wire level. Here is the test. Ping me when you are awake and I'll take you through the simple steps to set it up to run.

https://github.com/mongodb/node-mongodb-native/blob/master/test/sharded/read_preferences_sharded_test.js#L157

Comment by Randolph Tan [ 29/Jan/13 ]

Hi,

I have trouble replicating this. Do you have a script/steps that reliably reproduces this?

Thanks!

Generated at Thu Feb 08 03:17:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.