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

readConcern option should not be included in getMore commands

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5.4
    • 1.5.3
    • libmongoc
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: