IDL typed commands parse the incoming request in their constructor, and assign the parsed request to the `_request` member variable of the command.
If FLE is used, then the request may need to get rewritten later, so that some request values get redacted. In this case the request object gets copied for the FLE processing.
Currently some commands do this on their own at some point in their `typedRun()` or `explain()` methods. While working on SERVER-71453, denis.grebennicov@mongodb.com suggested to move the responsibility for FLE processing from the individual subclasses of TypedCommand into the TypedCommand base class.
This would reduce code duplication and would also ensure that FLE processing cannot be forgotten in the future, if more commands get converted from BasicCommand to TypedCommand.
- is caused by
-
SERVER-71453 Change count command from BasicCommand to IDL typed command
- Closed