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

Incorrect lifecycle documentation needs review

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.7.0
    • None
    • docs, libmongoc
    • None

    Description

      From http://mongoc.org/libmongoc/current/mongoc_collection_t.html:

      It is an error to call mongoc_collection_destroy() on a collection that has operations pending. It is required that you release mongoc_cursor_t structures before calling mongoc_collection_destroy().

      From http://mongoc.org/libmongoc/current/mongoc_database_t.html

      It is an error to call mongoc_database_destroy() on a database that has operations pending. It is required that you release mongoc_cursor_t structures before calling mongoc_database_destroy.

      From http://mongoc.org/libmongoc/current/mongoc_client_t.html:

      It is an error to call mongoc_client_destroy on a client that has operations pending. It is required that you release mongoc_collection_t and mongoc_database_t structures before calling mongoc_client_destroy.

      Per discussion on Slack, mongoc_cursor_t only cares about mongoc_client_t. Is that true for other types as well? Please audit lifecycle constraint documentation and update as needed.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: