[CSHARP-4008] Provide more flexible public API for $explain Created: 06/Jan/22 Updated: 11/Jan/22 Resolved: 11/Jan/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Dmitry Lukyanov (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
In the scope of Also, only Find command currently supports $explain in the modern driver, we should consider adding this modifier at least to Aggregate. |
| Comments |
| Comment by Dmitry Lukyanov (Inactive) [ 11/Jan/22 ] | |||||||||||||||||||||
|
At this point, we've decided to not introduce any new public API for explain and stick to what CRUD spec recommend, see What about explain? here | |||||||||||||||||||||
| Comment by Robert Stam [ 07/Jan/22 ] | |||||||||||||||||||||
|
This is a much larger task than it might appear at first glance. There are many operations that could be "explained". How many of them should we support? If we support some shouldn't we support all? Here's a first level approximation of the methods that might potentially be required:
Then we need to consider that many of these methods have multiple overloads (with/without session, Definition vs Expression, etc...) and figure out whether they all need to be supported as well. Most likely the session overloads are not needed for Explain, but the Definition vs Expression overloads would be. Also, all of those methods have Async versions as well. It would probably be acceptable to not provide async versions of Explain methods, since Explain methods should only be used during development and forcing the use of sync Explain methods (even in async programs) is probably OK. Lastly, there is the question whether all these helper methods should be added at all. Quoting from the CRUD spec:
The counter argument is that it might not be easy for the application developer to know exactly what query is actually being sent to the server, which would be required in order to use the shell for this purpose.
|