[SERVER-15217] v2.6 query plan ranking test "NonCoveredIxisectFetchesLess" relies on order of deleted record list Created: 11/Sep/14  Updated: 19/Sep/15  Resolved: 18/Jun/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.6.4
Fix Version/s: 2.6.11, 3.1.5

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Qingyang Chen
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Quint Iteration 5
Participants:

 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.



 Comments   
Comment by Githook User [ 18/Jun/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-15217 remove NonCoveredIxisectFetchesLess plan ranking test
Branch: v2.6
https://github.com/mongodb/mongo/commit/dd4d87a3a29c940aab70c54edee6223a275f531f

Comment by Githook User [ 16/Jun/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-15217 remove unused tests in dbtests/plan_ranking.cpp

Closes #985

Signed-off-by: Jason Rassi <rassi@10gen.com>
Branch: master
https://github.com/mongodb/mongo/commit/f9043a51b10b4481eacfa59fe9c9d1c95d871a6a

Generated at Thu Feb 08 03:37:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.