[JAVA-1784] UpdateUser command does not work with the 3.0.0 driver and 3.x server Created: 29/Apr/15 Updated: 02/Apr/16 Resolved: 04/May/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Command Operations |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.0.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dharshan Rangegowda | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | regression | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I am using the 3.0.0 driver to issue the following command to the 3.0.2 server. The goal is to change the password. BasicDBObject doc = new BasicDBObject("updateUser", "1"). The command always fails with the following error -"The server is not the primary and did not execute the operation" The same command runs fine from the mongo shell.It also runs fine against a 2.6.x server. So basically it fails against a 3.x server. |
| Comments |
| Comment by Jeffrey Yemin [ 05/May/15 ] |
|
Closed for 3.0.1 release. |
| Comment by Ross Lawley [ 30/Apr/15 ] |
|
Thanks dharshanr@scalegrid.net for reporting the issue. This has been fixed and will be released in 3.0.1 |
| Comment by Githook User [ 30/Apr/15 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Reinstated obedient commands for DB
|
| Comment by Githook User [ 30/Apr/15 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Reinstated obedient commands for DB
|
| Comment by Ross Lawley [ 29/Apr/15 ] |
|
In 3.0.0 the db.command(cmd) uses the set read preference of the database which must not be primary in your case. I'm investigating the reasons and / or cause for the change. In the meantime please include the read preference in your code to: db.command(cmd, ReadPreference.primary()) |