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

[SBE] Replace isSBEEnabled checked with a helper function

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: Query Execution
    • None
    • Fully Compatible
    • Query Execution 2021-05-03

      Currently we use the following patten in jstests when we need to figure out if we're in SBE mode or not:

      const isSBEEnabled = (() => {
          const getParam = db.adminCommand({getParameter: 1, featureFlagSBE: 1});
          return getParam.hasOwnProperty("featureFlagSBE") && getParam.featureFlagSBE.value;
      })();
      

      We should replace this boilerplate code with a helper function instead.

      Also, as ian.boros pointed out, this check wouldn't work in a sharded cluster in certain configurations. Namely, when db is using a connection to mongos which doesn't have the feature flag enabled.

            Assignee:
            nikita.lapkov@mongodb.com Nikita Lapkov (Inactive)
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: