-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.9
-
Component/s: Index Maintenance
-
None
-
ALL
-
I have a sharded collection with 5 repsets consisting of 3 mongod instances respectively. On the shards I have a collection sharded by
{ t: hashed}.
I enabled the no-table-scan parameter via db query to all mongod instances.
A while after that, delete and findAndModify queries showed up with no query solution.
The weird situation is that the queries should have a solution since indices for it are present.
There are these indices on the collection on all mongod instances:
[ { "v" : 1, "key" : { "t" : "hashed" }, "name" : "t_hashed", }, { "v" : 1, "unique" : true, "key" : { "t" : 1, "ty" : 1, "s" : 1 }, "name" : "t_1_ty_1_s_1", "background" : true }, { "v" : 1, "key" : { "s" : 1, "ty" : 1 }, "name" : "s_1_ty_1", "background" : true }, { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", } ]
When I query with: db.getCollection('x').find(
{s : 327079355})
I get an answer (although empty).
if I do a remove query: db.getCollection('x').remove(
)
I get:
multiple errors for op : error processing query: ns=dbname.x: s == 327079355.0
Sort: {}
Proj: {}
No query solutions :: and :: error processing query: ns=dbname.xTree: s == 327079355.0
Sort: {}
Proj: {}
No query solutions ...
i also did a short test and created a document and used that in the delete query.
Weirdly the remove query deleted the document but returned the error above too.
The output of db.getCollection('x').find(
).explain():
/* 1 */ { "queryPlanner" : { "mongosPlannerVersion" : 1, "winningPlan" : { "stage" : "SHARD_MERGE", "shards" : [ { "shardName" : "repset11", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } }, "rejectedPlans" : [] }, { "shardName" : "repset12", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } }, "rejectedPlans" : [] }, { "shardName" : "repset13", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } }, "rejectedPlans" : [] }, { "shardName" : "repset14", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } }, "rejectedPlans" : [] }, { "shardName" : "repset17", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } }, "rejectedPlans" : [] } ] } }, "ok" : 1.0 }
The output of db.getCollection('x').explain().remove(
{s : 327079355}):
/* 1 */ { "queryPlanner" : { "mongosPlannerVersion" : 1, "winningPlan" : { "stage" : "SHARD_WRITE", "shards" : [ { "shardName" : "repset11", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "DELETE", "inputStage" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } } }, "rejectedPlans" : [] }, { "shardName" : "repset12", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "DELETE", "inputStage" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } } }, "rejectedPlans" : [] }, { "shardName" : "repset13", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "DELETE", "inputStage" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } } }, "rejectedPlans" : [] }, { "shardName" : "repset14", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "DELETE", "inputStage" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } } }, "rejectedPlans" : [] }, { "shardName" : "repset17", "serverInfo" : { "version" : "3.4.9", "gitVersion" : "876ebee8c7dd0e2d992f36a848ff4dc50ee6603e" }, "plannerVersion" : 1, "namespace" : "dbname.x", "indexFilterSet" : false, "parsedQuery" : { "s" : { "$eq" : 327079355.0 } }, "winningPlan" : { "stage" : "DELETE", "inputStage" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "s" : 1, "ty" : 1 }, "indexName" : "s_1_ty_1", "isMultiKey" : false, "multiKeyPaths" : { "s" : [], "ty" : [] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 1, "direction" : "forward", "indexBounds" : { "s" : [ "[327079355.0, 327079355.0]" ], "ty" : [ "[MinKey, MaxKey]" ] } } } }, "rejectedPlans" : [] } ] } }, "ok" : 1.0 }