[SERVER-48244] Shell should not hard-code the allowed explain levels and let the server reject it instead Created: 15/May/20  Updated: 29/Oct/23  Resolved: 25/Jun/20

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 4.0.20, 4.2.9, 3.6.20, 4.7.0, 4.4.2

Type: Bug Priority: Major - P3
Reporter: Benjamin Flast Assignee: Hirday Gupta (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2, v4.0, v3.6
Steps To Reproduce:

Connect to MongoDB or an ADL and explain on a command with a verbosity level other than the 3 above and you will get:

 2020-05-15T10:54:37.091-0400 E QUERY [js] uncaught exception: Error: explain verbosity must be one of {'queryPlanner','executionStats','allPlansExecution'} :
 parseVerbosity@src/mongo/shell/explainable.js:21:19
 constructor@src/mongo/shell/explainable.js:44:27
 DBCollection.prototype.explain@src/mongo/shell/explainable.js:242:12
 @(shell):1:1

 

Sprint: Query 2020-06-29
Participants:

 Description   

On Atlas Data Lake it makes sense for us to support different levels of Verbosity in explain() but the Shell is error'ing on levels other than:

{'queryPlanner','executionStats','allPlansExecution'}

The shell should permit this and let server error on unsupported levels.

In this instance, ADL supported queryPlannerExtended, but the shell is rejecting it.



 Comments   
Comment by Githook User [ 11/Sep/20 ]

Author:

{'name': 'Hirday Gupta', 'email': 'hirday.gupta@mongodb.com', 'username': 'HirdayGupta'}

Message: SERVER-48244 remove shell-side explain string validation

(cherry picked from commit c76a5544eb4423c7dbca6862fddf9371ce999f6f)
Branch: v4.4
https://github.com/mongodb/mongo/commit/cfc133a7a6261436895614b8acc24aaebaad6212

Comment by Githook User [ 07/Aug/20 ]

Author:

{'name': 'Justin Seyster', 'email': 'justin.seyster@mongodb.com', 'username': 'jseyster'}

Message: SERVER-48244 Fix linter error
Branch: v4.0
https://github.com/mongodb/mongo/commit/8c2d241c4bdd4273b7f963ae07095513e94fec00

Comment by Githook User [ 06/Aug/20 ]

Author:

{'name': 'Hirday Gupta', 'email': 'hirday.gupta@mongodb.com', 'username': 'HirdayGupta'}

Message: SERVER-48244 remove shell-side explain string validation

(cherry picked from commit c76a5544eb4423c7dbca6862fddf9371ce999f6f)
Branch: v3.6
https://github.com/mongodb/mongo/commit/2b01612eceb90dee3681e86ec2cea90229ed5fe3

Comment by Githook User [ 06/Aug/20 ]

Author:

{'name': 'Hirday Gupta', 'email': 'hirday.gupta@mongodb.com', 'username': 'HirdayGupta'}

Message: SERVER-48244 remove shell-side explain string validation

(cherry picked from commit c76a5544eb4423c7dbca6862fddf9371ce999f6f)
Branch: v4.0
https://github.com/mongodb/mongo/commit/e199a343576be60a13154cf771e7a4d623e1d6c0

Comment by Githook User [ 05/Aug/20 ]

Author:

{'name': 'Hirday Gupta', 'email': 'hirday.gupta@mongodb.com', 'username': 'HirdayGupta'}

Message: SERVER-48244 remove shell-side explain string validation

(cherry picked from commit c76a5544eb4423c7dbca6862fddf9371ce999f6f)
Branch: v4.2
https://github.com/mongodb/mongo/commit/65a97f042f97a381c7cf009a99294885bd54cbf7

Comment by Githook User [ 24/Jun/20 ]

Author:

{'name': 'Hirday Gupta', 'email': 'hirday.gupta@mongodb.com'}

Message: SERVER-48244 remove shell-side explain string validation
Branch: master
https://github.com/mongodb/mongo/commit/c76a5544eb4423c7dbca6862fddf9371ce999f6f

Comment by Justin Seyster [ 18/Jun/20 ]

All Atlas-supported MongoDB versions also support ADL, so it is possible that any of these shells might connect to an ADL server that supports the 'queryPlannerExtended' option. This is a minor change, so I expect a straightforward backport process.

Comment by Justin Seyster [ 17/Jun/20 ]

benjamin.flast One more thing. Will this need backporting to previous versions of the shell? Thanks!

Comment by Benjamin Flast [ 26/May/20 ]

High, we've released functionality to utilize these other verbosity levels and they can't be used through the shell until this update is made.

 

My assumption is that the Server already has appropriate errors for this so it's just removing the restriction from the shell and should be a small piece of work?

Comment by Craig Homa [ 26/May/20 ]

Hey benjamin.flast, what would the priority be on this?

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