[CSHARP-3980] Remove reliance on "$explain" modifier so FindOpcodeOperation can be removed Created: 30/Nov/21  Updated: 28/Oct/23  Resolved: 20/Jan/22

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.15.0

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Dmitry Lukyanov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CSHARP-4008 Provide more flexible public API for ... Closed
Epic Link: Remove code for pre-3.6 server versions

 Comments   
Comment by Githook User [ 20/Jan/22 ]

Author:

{'name': 'DmitryLukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}

Message: CSHARP-3980: Remove reliance on "$explain" modifier so FindOpcodeOperation can be removed.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/169c6169c217f4bea8e36297b837952976bffbe8

Comment by Robert Stam [ 13/Jan/22 ]

I think the goals of this ticket are actually:

1. Remove the `FindOpcodeOperation` which now is only used when `$explain` modifier is present

2. Reimplement `MongoCursor.Explain` so that it uses `ExplainOperation` instead of `$explain`

The following should not be goals:

  1. Support the `$explain` `Modifier` in any of the 2.x APIs that support modifiers
  2. Support the `$explain` `Modifier` in any of the 1.x APIs that support modifiers

The main reason to not support the `$explain` modifier is that most of our APIs are strongly typed (e.g. `IMongoCursor<Person>`) and the `$explain` modifier changes what is returned from the server such that it can't be deserialized anyway (i.e. the explain output cannot be deserialized into a `Person` instance).

Generated at Wed Feb 07 21:46:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.