Fix non-deterministic reorder of $ors in tree node optimization

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Found while developing a prototype forĀ SPM-4379 because a golden test to optimize $matches would sometimes work and sometimes break on different runs. The use of this unordered map means that consecutive calls to this function may result in a change in $or predicate order. The fix is a one-liner- use an ordered map.

      The reason this could be an issue is because different orderings of the $or could result in different plan enumerations in the multiplanner, which would potentially change plans unpredictably between consecutive optimization calls.

            Assignee:
            Alya Berciu
            Reporter:
            Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: