Do not use join optimizer if any involved collections are sharded (not just the base)

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      An earlier ticket (SERVER-112725) checked for non-existent collections in executor.cpp and the same check also inadvertently passed for sharded collections. As a result, the tests in lookup_sharded_no_join_opt.js passed for sharded collections even without my new code because this check is triggered in executor.cpp
      if (mca.isAnySecondaryNamespaceAViewOrNotFullyLocal())

      { // TODO SERVER-112239: Enable support for views, as the above check will prevent views from // being used for join ordering. return false; }

      The correct check is to check if sharding is enabled on any of the foreign collections. The test now passes with my code as my new check is correctly triggered.

            Assignee:
            Vijay Sarathy
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: