[JAVA-1617] DBCollection should not return null WriteResult on an unacknowledged write Created: 09/Jan/15 Updated: 31/Mar/15 Resolved: 10/Jan/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API, Write Operations |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.0.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
In 2.x, an unacknowledged write operation on DBCollection returns a WriteResult, and any access to the WriteResult properties will trigger a call to the getlasterror command on the same socket, which is likely to fail with an exception. In 3.x we will no longer call getlasterror, and instead DBCollection returns a null WriteResult for any unacknowledged writes. This ticket proposes to change DBCollection to be closer to 2.x: return a WriteResult, but throw an exception from all property accessors. |
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] |
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. |
| Comment by Githook User [ 30/Jan/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: For an unacknowledged write, DBCollection now returns, instead of null, a WriteResult that is configured to throw exceptions for all property accessors. |
| Comment by Githook User [ 10/Jan/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: For an unacknowledged write, DBCollection now returns, instead of null, a WriteResult that is configured to throw exceptions for all property accessors. |