Unsafe to call mongoc_read_concern_append / mongoc_write_concern_append on the same struct from multiple threads

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • Not Needed
    • 🔵 Done
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Conversation with jmikola revealed that mongoc_read_concern_append and mongoc_write_concern_append may be unsafe to call on the same struct concurrently from multiple threads as the "freeze" functions that get called for these types do not use locks.

      Note this is not a problem for Swift as we don't call these methods at all, and manually encode our read concern / write concern types to bson_ts instead.

            Assignee:
            Unassigned
            Reporter:
            Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: