-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:None
-
Fully Compatible
-
ALL
-
-
Query 2019-11-04
-
7
In previous versions of the server, all $-prefixed path components were disallowed in the aggregation framework and, in particular, were disallowed in exclusion projections. As part of SERVER-42421, however, we introduced several reserved $-prefixed key names which are legal. These include "$ref", "$db", and "$id", which constitute DBRefs, as well as names used by the system internally to store metadata such as "$recordId", "$sortKey", and so on.
There is a lingering invariant in the exclusion projection parser which expects that the caller has rejected all $-prefixed field names. This invariant is no longer correct, since we permit certain reserved $-prefixed names as described above. We should remove or relax this incorrect invariant.