[JAVA-1134] BulkWriteResult.getModifiedCount should throw if server version < 2.6 Created: 06/Mar/14  Updated: 03/Apr/14  Resolved: 12/Mar/14

Status: Closed
Project: Java Driver
Component/s: Write Operations
Affects Version/s: None
Fix Version/s: 2.12.0

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

Issue Links:
Depends
is depended on by DRIVERS-143 Don't include the nModified field in ... Closed
is depended on by DRIVERS-145 Don't include the nModified field in ... Closed
Duplicate
is duplicated by JAVA-1142 Don't include the nModified field in ... Closed
is duplicated by JAVA-1146 Don't include the nModified field in ... Closed
Epic Link: BulkWriteResult.getModifiedCount improvements

 Description   

BulkWriteResult.getModifiedCount should throw MongoInternalException if server version < 2.6 because those servers can not provide the value properly via getlasterror. To detect whether it will throw, clients can call BulkWriteResult.isModifiedCountAvailable. If it returns true, it's safe to call BulkWriteResult.getModifiedCount



 Comments   
Comment by Githook User [ 12/Mar/14 ]

Author:

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

Message: JAVA-1134: Added BulkWriteResult.isModifiedCountAvailable(), which returns false if the server is unable to provide the count. BulkWriteResult.getModifiedCount() now throws if the count is unavailable.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/696272a5afa14644c10ddd8d3ca6dd38bce058f5

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