[JAVA-2227] DBCollection aggregate methods that take AggregationOptions fail to set slaveOk bit when read preference demands it Created: 16/Jun/16  Updated: 16/Feb/18  Resolved: 17/Jun/16

Status: Closed
Project: Java Driver
Component/s: Command Operations
Affects Version/s: 2.14.0
Fix Version/s: 2.14.3

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

The DBCollection aggregate method overloads that take AggregationOptions fail to set slaveOk bit when read preference demands it. When connected to a replica set, this will result in a CommandFailureException with the error message "not master".



 Comments   
Comment by Githook User [ 16/Feb/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: JAVA-2227: Fix aggregateToSecondary test so that it works with any type of Mongo deployment.
Branch: 2.14.x
https://github.com/mongodb/mongo-java-driver/commit/900c0de4bb9da57690af2d8533dc7ce31278defa

Comment by Githook User [ 16/Feb/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: JAVA-2227: When using aggregate helper methods that take an AggregationOptions parameter, ensure that slaveOk bit is set for non-primary read preferences
Branch: 2.14.x
https://github.com/mongodb/mongo-java-driver/commit/b295d2a82eaabe20ce54b35485d3bba57ef35669

Comment by Jeffrey Yemin [ 18/Jul/16 ]

Released in 2.14.3

Comment by Githook User [ 17/Jun/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2227: Fix aggregateToSecondary test so that it works with any type of Mongo deployment.
Branch: 2.14.x
https://github.com/mongodb/mongo-java-driver/commit/900c0de4bb9da57690af2d8533dc7ce31278defa

Comment by Githook User [ 17/Jun/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2227: When using aggregate helper methods that take an AggregationOptions parameter, ensure that slaveOk bit is set for non-primary read preferences
Branch: 2.14.x
https://github.com/mongodb/mongo-java-driver/commit/b295d2a82eaabe20ce54b35485d3bba57ef35669

Comment by Githook User [ 17/Jun/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2227: Fix aggregateToSecondary test so that it works with any type of Mongo deployment.
Branch: 2.x
https://github.com/mongodb/mongo-java-driver/commit/4e954ef95c0e8e35461f79065b32938c5bcd9f2b

Comment by Githook User [ 17/Jun/16 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-2227: When using aggregate helper methods that take an AggregationOptions parameter, ensure that slaveOk bit is set for non-primary read preferences
Branch: 2.x
https://github.com/mongodb/mongo-java-driver/commit/feae4a0522ba59c7cb4475ef0fbd1466e55f1ee7

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