-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.5.2
-
Fully Compatible
-
Sharding 2017-02-13, Sharding 2017-03-06
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().
- is depended on by
-
SERVER-27937 pull apart the AsyncResultsMerger logic into (1) establishing the cursors (2) sending the getMore's
- Closed