Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27973

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

    XMLWordPrintable

    Details

      Description

      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().

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              esha.maharishi Esha Maharishi
              Reporter:
              esha.maharishi Esha Maharishi
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: