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

Incorrect lifecycle documentation needs review

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.0
    • Affects Version/s: None
    • Component/s: Docs, libmongoc
    • None

      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.

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

              Created:
              Updated:
              Resolved: