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

v2.6 query plan ranking test "NonCoveredIxisectFetchesLess" relies on order of deleted record list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.4
    • Fix Version/s: 2.6.11, 3.1.5
    • Component/s: Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Quint Iteration 5

      Description

      The following patch to v2.6 PlanRankingTest::All::setupTests() causes the NonCoveredIxisectFetchesLess test to fail (see example failure).

      This test has been disabled in master, but exists in v2.6. I propose removing it entirely, in master and v2.6.

      diff --git a/src/mongo/dbtests/plan_ranking.cpp b/src/mongo/dbtests/plan_ranking.cpp
      index 02efa06..2e49e36 100644
      --- a/src/mongo/dbtests/plan_ranking.cpp
      +++ b/src/mongo/dbtests/plan_ranking.cpp
      @@ -833,20 +833,20 @@ namespace PlanRankingTests {
                   add<PlanRankingIntersectWithBackup>();
                   add<PlanRankingPreferCovered>();
                   add<PlanRankingAvoidIntersectIfNoResults>();
                   add<PlanRankingPreferCoveredEvenIfNoResults>();
                   add<PlanRankingPreferImmediateEOF>();
      +            add<PlanRankingPreferImmediateEOFAgainstHashed>();
                   add<PlanRankingNoCollscan>();
                   add<PlanRankingCollscan>();
                   add<PlanRankingIxisectCovered>();
                   add<PlanRankingIxisectNonCovered>();
                   add<PlanRankingNonCoveredIxisectFetchesLess>();
                   add<PlanRankingIxisectHitsEOFFirst>();
                   add<PlanRankingChooseBetweenIxisectPlans>();
                   add<PlanRankingAvoidBlockingSort>();
                   add<PlanRankingWorkPlansLongEnough>();
                   add<PlanRankingAccountForKeySkips>();
      -            add<PlanRankingPreferImmediateEOFAgainstHashed>();
               }
           } planRankingAll;
       
       }  // namespace PlanRankingTest
      

      I believe that success of the "NonCoveredIxisectFetchesLess" test relies on the DiskLoc order of the documents inserted in the collection (I believe that the first document having the smallest DiskLoc is the necessary condition, but I haven't investigated fully). In the failure scenario, I observe the intersection plan losing to one of the single-index plans because the AND_SORTED stage spent almost all of its work cycles advancing one of its two children. In the success scenario, I observe the intersection plan winning, and the AND_SORTED stage advancing both of its children approximately an equal amount. I infer that the value of the stage's first saved "targetLoc" explains the difference between these two executions.

      The failure occurs only when all suites are run; the failure does not occur when just the plan ranking suite is run.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: