readConcern option should not be included in getMore commands

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.5.4
    • Affects Version/s: 1.5.3
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Hannes Magnusson (Inactive)
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: