[JAVA-477] Read from primary server in replica set fails when using TaggedReadPreference Created: 27/Nov/11 Updated: 12/Aug/12 Resolved: 12/Aug/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Cluster Management |
| Affects Version/s: | 2.7.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bryan Hunt | Assignee: | Brendan W. McAdams |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
All components running on OS X 10.7.2. MongoDB version 2.0.1. Java driver version 2.7.2. |
||
| Issue Links: |
|
||||||||
| Description |
|
I'm trying to use the TaggedReadPreference with the Java driver when com.mongodb.MongoException: Could not find any valid secondaries with ' I also tested reading from the secondary and killing the primary. When My code looks like: HashMap<String, String> tags = new HashMap<String, String>(1); My replica set is configured as: PRIMARY> rs.conf() |
| Comments |
| Comment by Jeffrey Yemin [ 12/Aug/12 ] |
|
this will be fixed in 2.9.0 |
| Comment by Brendan W. McAdams [ 14/Dec/11 ] |
|
Fix depends on next major release of MongoDB which supports Tagged Read Preferencing in mongos. |
| Comment by Scott Hernandez (Inactive) [ 28/Nov/11 ] |
|
It is currently enabled in master in github so if you build from source you can test it. As Eliot said, it will not be in 2.7.x |
| Comment by Eliot Horowitz (Inactive) [ 28/Nov/11 ] |
|
Its supposed to be in 2.8 (or whatever the next version of the driver is called). |
| Comment by Bryan Hunt [ 28/Nov/11 ] |
|
Doh! I was hoping to use this feature to help make my case for MongoDB with management. My use case is probably typical in that we need to deploy servers in multiple countries. Write propagation is not critical, but local reads are. Any chance you would consider fixing the non-sharding case in 2.7.3 and then remove the feature in 2.7.4 so I could at least try a demo for my management? Any ETA on when this feature will be fully released? |
| Comment by Brendan W. McAdams [ 28/Nov/11 ] |
|
Inner Static class for Tagged Read Preference should be disabled to prevent user access to this not-yet-enabled feature. |
| Comment by Brendan W. McAdams [ 28/Nov/11 ] |
|
Reading by tags is not currently supported and should have been disabled in the driver; it seems that the class stub for future support was left exposed in this release and shouldn't have been. Until mongos supports reading by tags we are not adding support for that to our drivers to provide consistent support of features across sharded and unsharded setups. |