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

[SBE] Rewrite engine specific assertions to be multiversion compatible

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0, 5.1.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.1
    • QE 2021-10-04, QE 2021-10-18
    • 66

      Currently, the checkSBEEnabled function first assumes SBE is on, and then checks if there is a property internalQueryForceClassicEngine and if it is true, and if so, returns that SBE is off. However, the internalQueryForceClassicEngine setParameter didn't exist prior to 5.1, so in multiversion testing, SBE is incorrectly returned as on when it shouldn't be.

      In order to remedy this, we can flip the sense of the check. The checkResult flag should really be called isSBEEnabled for more clarity, be initialized to false, and then the check for each node can be:
      isSbeEnabled = getParam.hasOwnProperty("internalQueryForceClassicEngine") && !getParam.internalQueryForceClassicEngine;
      With this change, SBE will be off by default in the versions where the internalQueryForceClassicEngine flag doesn't exist, and will be checked as normal in versions where it does exist.

      We may also want to consider adding a secondary check in the case that internalQueryForceClassicEngine doesn't exist:
      isSbeEnabled = getParam.hasOwnProperty("internalQueryEnableSlotBasedExecutionEngine") && getParam.internalQueryEnableSlotBasedExecutionEngine;
      This was the old flag before internalQueryForceClassicEngine was added, and this could help us still test SBE in versions before we changed the flag.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            jennifer.peshansky@mongodb.com Jennifer Peshansky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: