Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75369

Fix the overflow of total possible enumeration count in LockstepOr enumeration strategy

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0, 6.0.6, 4.4.22, 5.0.18
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v6.2, v6.0, v5.0, v4.4
    • QO 2023-04-03
    • 5

      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.

            Assignee:
            ruoxin.xu@mongodb.com Ruoxin Xu
            Reporter:
            ruoxin.xu@mongodb.com Ruoxin Xu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: