-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
Fully Compatible
-
200
-
2
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Problem
Today, ParsedUpdate contains CanonicalQuery which has already been optimized. ParsedUpdate does not follow the common way of parsing like: raw BSON → parsed command → CmdShape → CQ. That makes shapification of updates difficult to obtain unoptimized MatchExpression for queries.
Plan of Attack
To make update parser acts similar to find/agg/distinct, we will separate ParsedUpdate into 2: a) real ParsedUpdate b) CanonicalUpdate. The new parsing flow looks like:
rawBSON → ParsedUpdate → UpdateCmdShape → CanonicalUpdate
- depends on
-
SERVER-113839 POC to refactor ParsedUpdate to allow shapifying with unoptimized query
-
- Closed
-
- is duplicated by
-
SERVER-112478 Query for update command shape cannot be canonicalized and optimized
-
- Closed
-
- related to
-
SERVER-114368 Avoid raw pointers to ParsedUpdate (or CanonicalUpdate) and ParsedDelete
-
- Backlog
-