There's a count variable for computing the total possible enumeration of a $or query.
This variable could overflow if the $or is large enough, e.g. a machine generated $or with 200 predicates. Each predicate has two possible enumerations. The size_t count would overflow with a value of 2^200.
While calculating the count, we can bail out early if the count reaches the limit for $or, which is 10 by default.
- is depended on by
-
SERVER-74893 Change default enumeration strategy for planning $or queries
- Closed