[CDRIVER-926] mongoc_collection_aggregate can return NULL Created: 09/Oct/15  Updated: 24/Nov/15  Resolved: 24/Nov/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.0

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-880 mongoc_collection_aggregate might ret... Closed

 Description   

In CDRIVER-880 we opted to hold true to our docs and return a valid cursor that would then result in failure once iterated over.

However, mongoc_collection_aggregate() can return a NULL when the server preselection fails, and no error will be reported at all as we discard of the error from the preselect:

https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-collection.c#L243-L251



 Comments   
Comment by A. Jesse Jiryu Davis [ 24/Nov/15 ]

Fixed along with CDRIVER-880.

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