-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Service Arch
-
v8.0
-
Service Arch 2024-02-05, Service Arch 2024-02-19, Service Arch 2024-03-04, Service Arch 2024-03-18, Service Arch 2024-04-01, Service Arch 2024-04-15, Service Arch 2024-04-29
After SERVER-80296 is complete, the number of times the command request BSON is parsed on the command processing path will have greatly reduced. However, even after those changes, each command will still need to perform at least two parses: one for the common args (as consolidated in SERVER-80296) and one for the command-specific fields (often an IDL-generated parse). We should move the latter parsing up earlier in the processing path so that we can combine it with the common argument parsing into a single pass, hopefully improving performance.
Some commands may still do parsing in multiple steps to allow for early exiting or to distribute the work involved in the parsing (e.g. aggregations may do this with the pipeline), but such cases should not need to walk over the entire request BSON for the subsequent passes.
This work will also be useful for PM-3613, which needs to inspect command requests in order to determine queuing priority. Moving the parsing step earlier as suggested above allows for such inspections to neither introduce an extra parsing step (which would hurt performance) nor rely on workarounds that could be a bit messy.
- depends on
-
SERVER-42057 IDL option to generate chained setters
- Closed
-
SERVER-89351 Combine generic argument structs
- In Code Review
-
SERVER-88214 Add types to generic_argument.idl
- Closed
- is related to
-
SERVER-80296 Refactor command request processing path to reduce BSON parsing passes
- Closed
-
SERVER-88205 Eliminate redundant $db parses on common command paths
- Closed
- related to
-
SERVER-88604 Add more common request arguments
- Closed