Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-926

mongoc_collection_aggregate can return NULL

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.2.0
    • None
    • None
    • None

    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

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: