[SERVER-27973] make ClusterClientCursor own ClusterClientCursorParams and pass the params by reference to RouterStageMerge/ARM Created: 10/Feb/17  Updated: 05/Apr/17  Resolved: 16/Feb/17

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: 3.5.2
Fix Version/s: 3.5.4

Type: Improvement Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Done Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-27937 pull apart the AsyncResultsMerger log... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-02-13, Sharding 2017-03-06
Participants:

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



 Comments   
Comment by Githook User [ 16/Feb/17 ]

Author:

{u'username': u'EshaMaharishi', u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-27973 make ClusterClientCursor own ClusterClientCursorParams and pass the params by reference to RouterStageMerge/ARM
Branch: master
https://github.com/mongodb/mongo/commit/3352feab5733189d732cfc73053f874011d1cb86

Generated at Thu Feb 08 04:16:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.