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

readConcern option should not be included in getMore commands

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.4
    • Affects Version/s: 1.5.3
    • Component/s: libmongoc
    • None

      In mongodb/mongo-php-driver#516, a user encountered the following error when iterating on a large result set on a find operation that included a "local" read concern level:

      Failed to parse: { getMore: 44504619209605, collection: "customers", readConcern: { level: "local" } }. Unrecognized field 'readConcern'.

      If we look at _mongoc_cursor_cursorid_get_more(), it calls _mongoc_cursor_prepare_getmore_command() to create the getMore command document. That document is then passed along to _mongoc_cursor_cursorid_refresh_from_command() and executed with _mongoc_cursor_run_command(), wherein a readConcern field may be appended. The logic for appending the readConcern needs to be a bit more restrictive so that it only triggers for supported commands.

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: