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

Separate command and query code

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      Don't create an internal cursor to execute a command with OP_QUERY.

      Still to do:

      • Get a new struct, mongoc_server_stream_t, that wraps a stream and server description
      • Update cluster to return mongoc_server_stream_t's with info from ismaster call on that stream
      • Reduce calls to mongoc_cluster_get_max_bson_obj_size and co., get those values from the mongoc_server_stream_t
      • Reduce calls to mongoc_topology_server_by_id, prefer to pass around mongoc_server_stream_t's rather than "hints" or server_id's
      • Reduce need to pass is_write_command around.
      • Reduce calls to topology_select in places like mongoc_collection_aggregate: get a stream and server description at the same time
      • Put $readPreference into the BSON as early as possible, in order to
        simplify run_command.
      • Refactor error-checking that's duplicated between my new
        _mongoc_rpc_parse_error and the existing mongoc_cursor_error DONE

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

              Created:
              Updated:
              Resolved: