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

Fix self-swap in MultiPlanStage::removeRejectedPlans

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.15, 6.0.4, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • QE 2022-10-17
    • 135

      In if statement here we should check _backupPlanIdx, not _bestPlanIdx https://github.com/mongodb/mongo/blob/1d93d09948c29534f7c82950ba7771ac0f4da22c/src/mongo/db/exec/multi_plan.cpp#L367

      It is relatively harmless, but causes debug mode to show errors, because of an old C++ standard issue: https://stackoverflow.com/questions/22915325/avoiding-self-assignment-in-stdshuffle

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: