The change streams have been implemented assuming that the BSONObj ownership is kept by the MatchExpression.
To reduce the overheads of copying BSONObj into MatchExpressions, we aim to remove the _backingBSON from the MatchExpression. The MatchExpression will compare against a reference of an already existing BSONObj which survives the query.
This ticket will update the design of Stream Helpers:
i. Match expressions depend on already existing BSONObj.
ii. Ensure all BSONObj used in MatchExpressions are in scope.
iii. Simplify where possible the building of MatchExpressions.
- is depended on by
-
SERVER-87277 Reduce CanonicalQuery creation overhead by avoiding BSONObj creation
- Closed
- is related to
-
SERVER-90081 Refactor change_streams to reduce performance impact of BSONObj creation and MatchExpression building
- Closed