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

Issues in documentation for read concern option "level"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: Docs
    • None

      There are several issues in the mongoc_read_concern_t documentation regarding the server default read concern:

      1. The documentation for mongoc_read_concern_get_level states that the empty string is returned when no read concern is set. However, 1.6.2, NULL is returned in this case, not the empty string.
      2. Similarly, the documentation for read_concern_t contains the same error regarding the empty string, in the "Synopsis" section.
      3. The documentation for mongoc_read_concern_set_level does not state how to set the server default read concern (the current wording implies that neither NULL nor the empty string are valid values to pass in for "level").

      On a related note, the wording for the documentation of the parameter "level" in mongoc_read_concern_set_level() could be improved for the driver to be in better compliance with the Read and Write Concern spec. In particular, the spec states: "For forward compatibility, a driver MUST NOT raise an error when a user provides an unknown level...". In the hypothetical scenario where MongoDB 3.6 is released with a new read concern "foo", the C driver 1.6.2 documentation implies that "foo" is not a valid value to pass into the mongoc_read_concern_set_level() function when connected to this server.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: