|
jstests/core/ord.js fails on the following line because the index drop should kill all cursors on the indexed namespace. For context the explain plan looks like this:
{
|
"explainVersion" : "2",
|
"queryPlanner" : {
|
"namespace" : "test.jstests_ord",
|
"indexFilterSet" : false,
|
"parsedQuery" : {
|
"$or" : [
|
{
|
"a" : {
|
"$eq" : 1
|
}
|
},
|
{
|
"b" : {
|
"$eq" : 1
|
}
|
}
|
]
|
},
|
"queryHash" : "F4D30AA0",
|
"planCacheKey" : "7BEAA584",
|
"maxIndexedOrSolutionsReached" : false,
|
"maxIndexedAndSolutionsReached" : false,
|
"maxScansToExplodeReached" : false,
|
"winningPlan" : {
|
"queryPlan" : {
|
"stage" : "FETCH",
|
"planNodeId" : 4,
|
"inputStage" : {
|
"stage" : "OR",
|
"planNodeId" : 3,
|
"inputStages" : [
|
{
|
"stage" : "IXSCAN",
|
"planNodeId" : 1,
|
"keyPattern" : {
|
"a" : 1
|
},
|
"indexName" : "a_1",
|
"isMultiKey" : false,
|
"multiKeyPaths" : {
|
"a" : [ ]
|
},
|
"isUnique" : false,
|
"isSparse" : false,
|
"isPartial" : false,
|
"indexVersion" : 2,
|
"direction" : "forward",
|
"indexBounds" : {
|
"a" : [
|
"[1.0, 1.0]"
|
]
|
}
|
},
|
{
|
"stage" : "IXSCAN",
|
"planNodeId" : 2,
|
"keyPattern" : {
|
"b" : 1
|
},
|
"indexName" : "b_1",
|
"isMultiKey" : false,
|
"multiKeyPaths" : {
|
"b" : [ ]
|
},
|
"isUnique" : false,
|
"isSparse" : false,
|
"isPartial" : false,
|
"indexVersion" : 2,
|
"direction" : "forward",
|
"indexBounds" : {
|
"b" : [
|
"[1.0, 1.0]"
|
]
|
}
|
}
|
Indeed, the query fails with the following uassert because each IXSCAN calls 'RequiresIndexStage::doRestoreStateRequiresCollection()' after the index drop (the parent OR will unconditionally reopen all of its child stages). As such, I believe this test is related to the work in SERVER-49385, since 'ord.js' appears to be testing this behavior.
|