-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.8.0-rc5
-
Component/s: Index Maintenance
-
None
-
Fully Compatible
-
ALL
-
RPL 0 3/13/15
-
0
Start a mongod with --noIndexBuildRetry.
Run the following script to build a index.
var bulk = db.jstests_bgsec.initializeUnorderedBulkOp(); for( i = 0; i < 100000; ++i ) { bulk.insert({ i : i }); } assert.writeOK(bulk.execute()); db.jstests_bgsec.ensureIndex( {i:1} );
Kill mongod with signal 9. Restart mongod with --noIndexBuildRetry. The index is still in the index catalog, but not available for query.
> db.jstests_bgsec.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "test.jstests_bgsec" }, { "v" : 1, "key" : { "i" : 1 }, "name" : "i_1", "ns" : "test.jstests_bgsec", "background" : true } ] > db.jstests_bgsec.find({i: {$gt: -1}}).hint({i: 1}).explain() 2015-01-15T17:23:21.955-0500 I QUERY Error: explain failed: { "ok" : 0, "errmsg" : "error processing query: ns=test.jstests_bgsec limit=0 skip=0\nTree: i $gt -1.0\nSort: {}\nProj: {}\n planner returned error: bad hint", "code" : 2 } at Error (<anonymous>) at Function.throwOrReturn (src/mongo/shell/explainable.js:34:19) at constructor.finish (src/mongo/shell/explain_query.js:188:36) at DBQuery.explain (src/mongo/shell/query.js:434:25) at (shell):1:52 at src/mongo/shell/explainable.js:34 > db.jstests_bgsec.stats() { "ns" : "test.jstests_bgsec", "count" : 100000, "size" : 4800080, "avgObjSize" : 48, "numExtents" : 6, "storageSize" : 11182080, "lastExtentSize" : 8388608, "paddingFactor" : 1, "paddingFactorNote" : "paddingFactor is unused and unmaintained in 2.8. It remains hard coded to 1.0 for compatibility only.", "userFlags" : 1, "nindexes" : 1, "indexDetails" : { }, "totalIndexSize" : 3262224, "indexSizes" : { "_id_" : 3262224 }, "ok" : 1 }
- is depended on by
-
SERVER-16645 Re-enable JS tests for yielding
- Closed
- related to
-
SERVER-18087 index_retry.js and index_no_retry.js not checking for presence of "progress" field in currentOp() result
- Closed
- links to