[JAVA-657] ReadPrefs ignored for some commands due to case-sensitive comparison Created: 01/Oct/12  Updated: 19/Mar/13  Resolved: 09/Mar/13

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: 2.9.0
Fix Version/s: 2.11.0

Type: Bug Priority: Major - P3
Reporter: Matt Schemmel Assignee: Jeffrey Yemin
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File java657.fix.diff    
Issue Links:
Related
related to JAVA-497 ReadPrefs ignored for commands Closed

 Description   

The list of secondary-aware ('obedient') commands in DB.java uses the camel-case version of commands like dbStats and collStats. The java driver itself emits these commands in lowercase: dbstats, collstats. Thus the commands whitelist check fails and the commands are always sent to the primary.

Commands are not fully case-insensitive (SERVER-6651), so the best fix for the moment is probably identifying the full list of command aliases supported by the server and making sure they're all in the whitelist.



 Comments   
Comment by auto [ 09/Mar/13 ]

Author:

{u'date': u'2013-03-09T19:36:28Z', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-657: ReadPreference ignored for some commands due to case-sensitive comparison
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/fb03f36c142e308c43ee34048de9115ee4960b8b

Comment by Richard Boyer [ 08/Mar/13 ]

Attaching fix for what Jeff describes.

It would be nice to get this fix in soon.

Comment by Matt Schemmel [ 02/Oct/12 ]

Good w that

Comment by Jeffrey Yemin [ 01/Oct/12 ]

Driver should lower case the command names before doing the comparison.

Comment by Matt Schemmel [ 01/Oct/12 ]

See also: JAVA-497

Generated at Thu Feb 08 08:52:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.