-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2023-01-23
The jstests/core/index_key_expression.js failed in some of the sharding passthrough with the error - "The field '$const' is not valid for an index specification.", where the extra $const specifier gets prepended to the index spec in some cases, as in:
{ $const: { key: { b: 1.0, a: -1.0 }, name: \"btreeIndex\" } }
The $const causes the index-specification validation code to flag this spec as invalid; hence, the JS test fails with an unexpected error. This could be a legit issue and this ticket is about investigating the cause.