[SERVER-75369] Fix the overflow of total possible enumeration count in LockstepOr enumeration strategy Created: 28/Mar/23 Updated: 29/Oct/23 Resolved: 29/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0, 6.0.6, 4.4.22, 5.0.18 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ruoxin Xu | Assignee: | Ruoxin Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v6.2, v6.0, v5.0, v4.4
|
||||||||||||||||
| Sprint: | QO 2023-04-03 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 5 | ||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 03/May/23 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: (cherry picked from commit 6bb0a27e70d7484f4dc9532c35dc1f0c7be873a3) |
| Comment by Githook User [ 03/May/23 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: (cherry picked from commit 6bb0a27e70d7484f4dc9532c35dc1f0c7be873a3) |
| Comment by Githook User [ 27/Apr/23 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: (cherry picked from commit 6bb0a27e70d7484f4dc9532c35dc1f0c7be873a3) |
| Comment by Githook User [ 29/Mar/23 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}Message: |