-
Type:
Task
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
QE 2022-05-30, QE 2022-06-13, QE 2022-06-27, QE 2022-07-11, QE 2022-09-19
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
There are some expression context flags like allowDiskUse, fromMongos, needsMerge, bypassDocumentValidation, and hasWhere flags that are set based on things that are in the original command. Instead of storing these extra flags we could just have a reference to the original command and code could check that, or we could turn the flags into getters like fromMongos(). We already store the original command in cursors to begin with and even have an originalCommand field on the expression context. it's just not set a lot of the time. A downside to this approach is during testing the originalCommand would have to be updated instead of just setting a bool to true.