make ClusterClientCursor own ClusterClientCursorParams and pass the params by reference to RouterStageMerge/ARM

XMLWordPrintableJSON

    • Fully Compatible
    • Sharding 2017-02-13, Sharding 2017-03-06
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      ClusterClientCursorParams is currently stored in the AsyncResultsMerger (ARM).

      However, the ARM also has some odd behavior, such as returning the view definition on CommandOnShardedViewNotSupportedOnMongod errors in a "fake" result.

      Then, cluster_find.cpp::runQueryWithoutRetrying checks for this "fake" result in addition to checking for an error status. If the view definition is set on the result, the view definition is passed up along with an error status.

      Instead:

      The logical place for ClusterClientCursorParams to be owned is ClusterClientCursor. ClusterClientCursorParams should be passed by reference down to the ARM.

      Then, rather than using a "fake" result to transmit a view definition from the ARM to cluster_find.cpp::runQueryWithoutRetrying, the view definition should be set in the ClusterClientCursorParams by the ARM, and the ARM should return an error status.

      On seeing this error status, the view definition should be retrieved by cluster_find.cpp::runQueryWithoutRetrying from a new method, ClusterClientCursor::getViewDefinition().

            Assignee:
            Esha Maharishi (Inactive)
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: