[SERVER-16053] explain shell helpers should retry using $explain if explain command fails on a mixed version sharded cluster Created: 10/Nov/14  Updated: 26/Oct/15  Resolved: 14/Nov/14

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 2.8.0-rc1

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-4370 Doc retry behavior of explain shell h... Closed
Related
is related to SERVER-10448 Revamp explain() formatting Closed
Participants:

 Description   

Suppose you have the following configuration:

  • version 2.8 mongo shell
  • version 2.8 mongos
  • version 2.6 shards

Based on the wire version reported by mongos, the shell will notice that the mongos has the explain command available. It will issue explains using the explain command rather than falling back to the $explain query flag.

However, the explain command on mongos explicitly fails unless all shards are version 2.8. This means that it is impossible to run explain with the above configuration. The shell should retry using legacy $explain in order to support explains in this configuration.



 Comments   
Comment by Githook User [ 14/Nov/14 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-16053 shell retries using $explain if explain cmd not found on a shard

Also adds multi-version test for explain.
Branch: master
https://github.com/mongodb/mongo/commit/2de05fd1e465a2889c0f1035709710da8b0ad041

Comment by David Storch [ 14/Nov/14 ]

Drivers implementing explain shell helpers should also implement this retry behavior.

Comment by David Storch [ 11/Nov/14 ]

This change permits exercising the $explain code path on mongos for a version 2.8 mongos with a 2.8 shell. As such, part of the work for this ticket will be writing multiversion tests which verify correctness of $explain in mixed version sharded configurations.

Generated at Thu Feb 08 03:39:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.