[JAVA-464] driver does not properly recognize certain command errors Created: 31/Oct/11 Updated: 10/Dec/12 Resolved: 13/Jul/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | 2.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Antoine Girbal | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
when calling a command, driver checks for error using the "err" field. For example, when using an unknown "w" policy: , "connectionId" : 82 , "errmsg" : "exception: unrecognized getLastError mode: blah" , "code" : 14830 , "ok" : 0.0} in 3ms looks like driver should instead rely on ok=0 and then look for either err or errmsg. |
| Comments |
| Comment by Mathieu Ruellan [ 10/Dec/12 ] | |
|
Thank you! You make my day! | |
| Comment by Jeffrey Yemin [ 10/Dec/12 ] | |
|
What WriteConcern are you using? If you're doing something like:
then that would trigger this error. Make sure you're using the integer 1 and not the String "1". | |
| Comment by Mathieu Ruellan [ 10/Dec/12 ] | |
|
I'm using mongodb 2.2.2 (debian 64bit), spring-data-mongo 1.1.1-Release and java mongo drivers 2.9.3. I've got a similar message : error command failed [getlasterror]: { "serverUsed" : "localhost/127.0.0.1:27017" , "n" : 0 , "lastOp" : { "$ts" : 1355143187 , "$inc" : 1}, "connectionId" : 49 , "errmsg" : "exception: unrecognized getLastError mode: 1" , "code" : 14830 , "ok" : 0.0} Any advice? | |
| Comment by Jeffrey Yemin [ 29/Aug/12 ] | |
|
Closing as part of 2.9.0 release process. | |
| Comment by Jeffrey Yemin [ 13/Jul/12 ] | |
|
Tracked this down finally. I had fixed it as a side effect of this commit: Message: refactored com.mongodb.DBTCPConnector#_checkWriteError to make intent clearer. | |
| Comment by Jeffrey Yemin [ 04/Jun/12 ] | |
|
That change was done in scope of | |
| Comment by Antoine Girbal [ 04/Jun/12 ] | |
|
restoring original title | |
| Comment by Jeffrey Yemin [ 22/May/12 ] | |
|
Pushing this to 2.9.0. | |
| Comment by Jeffrey Yemin [ 02/May/12 ] | |
|
"errmsg" is for command failures | |
| Comment by Jeffrey Yemin [ 16/Mar/12 ] | |
|
Antoine, any idea what the known distinction is between the 2? Should the driver treat "err" and "errmsg" differently? |