-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.0-rc1
-
Component/s: Index Maintenance, Replication
-
ALL
-
Similar to SERVER-12956, but on 2.6.0RC1 git rev 52fe0d21959e32a5bdbecdc62057db386e4e029c
When a secondary is stopped during the build of an index it will not resume and complete the index build and the index will not be available for use.
The last line of the index build was:
2014-02-28T13:26:41.002+1100 [repl index builder 0] Index Build(background): 775600/1358322 57%
When running a query on that secondary i see the following:
db.test.find({x:-2}).explain(true); { "cursor" : "BasicCursor", "isMultiKey" : false, "n" : 1, "nscannedObjects" : 1358323, "nscanned" : 1358323, "nscannedObjectsAllPlans" : 1358323, "nscannedAllPlans" : 1358323, "scanAndOrder" : false, "indexOnly" : false, "nYields" : 0, "nChunkSkips" : 0, "millis" : 570, "indexBounds" : { }, "allPlans" : [ { "cursor" : "BasicCursor", "n" : 1, "nscannedObjects" : 1358323, "nscanned" : 1358323, "indexBounds" : { } } ], "server" : "Pixl.local:27018" }
Validate does not test the index:
.... "objectsFound" : 1358323, "invalidObjects" : 0, "bytesWithHeaders" : 347730432, "bytesWithoutHeaders" : 325997264, "deletedCount" : 15, "deletedSize" : 113161136, "nIndexes" : 1, "keysPerIndex" : { "test.test.$_id_" : 1358323 }, "valid" : true, "errors" : [ ], "ok" : 1 }
But system.indexes shows it to exist:
db.system.indexes.find(); { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "test.test" } { "v" : 1, "key" : { "x" : 1, "fruits" : 1, "transport" : 1 }, "name" : "x_1_fruits_1_transport_1", "ns" : "test.test", "background" : true }
This looks to be a silent corruption and would only become evident when you examine why said index is not being used for query evaluation,
- related to
-
SERVER-12956 Stopping a secondary in phase 2/3 of an index build corrupts the index
- Closed