[CXX-1172] Document `result::bulk_write::modified_count()` throws with mongod 2.4 Created: 16/Dec/16  Updated: 30/Jan/17  Resolved: 30/Jan/17

Status: Closed
Project: C++ Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 3.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Samuel Rossi (Inactive) Assignee: Samuel Rossi (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DRIVERS-144 nModified should be null from legacy ... Closed

 Description   

Because nModified is not returned by mongod 2.4, result::bulk_write::modified_count() will throw an exception due to the get_int32() call on the document element. This should be documented.



 Comments   
Comment by Githook User [ 30/Jan/17 ]

Author:

{u'username': u'saghm', u'name': u'Saghm Rossi', u'email': u'saghmrossi@gmail.com'}

Message: CXX-1172 Document `result::bulk_write::modified_count()` throws with mongod 2.4
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/62e7d00e35b95e4aceb60337c6c0a24226dbd94c

Comment by J Rassi [ 17/Dec/16 ]

That seems fair to me.

Comment by David Golden [ 16/Dec/16 ]

Given that 2.4 is going away, I advised Sam to just to document the limitation. I'd rather not add code that will be dead code soon.

Comment by J Rassi [ 16/Dec/16 ]

As part of the fix for this ticket, I'd recommend also changing result::bulk_write::modified_count() to throw a more appropriate exception in this case.

Generated at Wed Feb 07 22:01:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.