-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Query Execution
-
Minor Change
-
QE 2024-09-02, QE 2024-09-16, QE 2024-09-30
Today, the count command is a BasicCommand. We are going to change it to IDL typed command for the following reason:
- To pass in tenant information. There is no way to access the original request's validate tenant scope from run() function of BasicCommand. We need the tenant information to have the internal generated aggregation request run correctly.
- To have the right access contractor for this command. BasicCommand has empty access contractor. But, count command as a version 1 stable api, it should have an access contractor which is defined in its idl file.
We should consider the following points when we doing this.
- the reply object. Currently, in count_command.idl, the reply type is OkReply. It's not correct as counter command should return "n" field in reply message.
- the data type for "n" field. Currently, it's serialized with appendNumber function which can serialize data into either 32 bit int or 64 bit int. We should keep this behavior so that we will not break driver and user's code. But, the IDL compiler has no any type matching this requirement. Need more investigation on how to do it.
- the impact on api compatibility as we need to add a new access check item to the access check list. It's "should_ignore_auth_checks" as `count` command calls the function `shouldIgnoreAuthChecks.
- some unit test and jstest files will be impacted if they pass in an invalid count request as IDL parser checks request body more carefully.
- causes
-
SERVER-94834 Centralize FLE processing for commands
- Closed
- is depended on by
-
COMPASS-8324 Investigate changes in SERVER-71453: Change count command from BasicCommand to IDL typed command
- Needs Triage
-
TOOLS-3676 Investigate changes in SERVER-71453: Change count command from BasicCommand to IDL typed command
- Accepted