-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.6
-
Component/s: Index Maintenance
-
Labels:None
-
Environment:3.2.22-35.60.amzn1.x86_64, 7.5 GB RAM
I'm trying to compact one of my large, sharded collections. After setting up a new secondary with a copy of the master's data, the command failed when attempting to rebuild the index/shard key:
{ "ns" : "data.intervals", "key" : { "datapoint_id" : 1, "localdate" : 1 }, "name" : "datapoint_id_1_localdate_1", "unique" : true, "v" : 0 }
So, I re-copied the data and ran validate(
{full: true}) first, which declared my collection to be healthy (ok's were all 1, no errors or invalidObjects). However, it failed again:
SECONDARY> db.intervals.runCommand("compact"); { "assertion" : "bad key order in BtreeBuilder - server internal error", "assertionCode" : 10288, "errmsg" : "db assertion failure", "ok" : 0 }
The stack trace from the secondary's log:
Fri Jul 6 20:06:16 [conn300] compact create index { datapoint_id: 1.0, localdate: 1.0 } Fri Jul 6 20:06:16 [conn300] build index data.intervals { datapoint_id: 1.0, localdate: 1.0 } Fri Jul 6 20:06:26 [conn300] Assertion: 10288:bad key order in BtreeBuilder - server internal error 0x5848a2 0x75aa59 0x8c283c 0x8b180c 0x8b2a55 0x8b37d3 0x8b468e 0xaa85dd 0xaa8c4f 0xaa98b7 0x97c4f4 0x97dbfd 0x940f05 0x943a30 0x889107 0x88dcd9 0xaa0bc8 0x6389f7 0x34f78077f1 0x34f70e5ccd /opt/mongodb/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x112) [0x5848a2] /opt/mongodb/bin/mongod(_ZN5mongo12BtreeBuilderINS_12BtreeData_V1EE6addKeyERNS_7BSONObjENS_7DiskLocE+0x519) [0x75aa59] /opt/mongodb/bin/mongod(_ZN5mongo24buildBottomUpPhases2And3INS_12BtreeData_V1EEEvbRNS_12IndexDetailsERNS_21BSONObjExternalSorterEbRSt4listINS_7DiskLocESaIS7_EEPNS_5CurOpEPNS_12SortPhaseOneERNS_19ProgressMeterHolderERNS_5TimerE+0x26c) [0x8c283c] /opt/mongodb/bin/mongod(_ZN5mongo14fastBuildIndexEPKcPNS_16NamespaceDetailsERNS_12IndexDetailsEi+0xc2c) [0x8b180c] /opt/mongodb/bin/mongod() [0x8b2a55] /opt/mongodb/bin/mongod(_ZN5mongo16insert_makeIndexEPNS_16NamespaceDetailsERKSsRKNS_7DiskLocE+0x1c3) [0x8b37d3] /opt/mongodb/bin/mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibbPb+0x6fe) [0x8b468e] /opt/mongodb/bin/mongod(_ZN5mongo8_compactEPKcPNS_16NamespaceDetailsERSsbRNS_14BSONObjBuilderE+0x1bdd) [0xaa85dd] /opt/mongodb/bin/mongod(_ZN5mongo7compactERKSsRSsbRNS_14BSONObjBuilderE+0x1cf) [0xaa8c4f] /opt/mongodb/bin/mongod(_ZN5mongo10CompactCmd3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x267) [0xaa98b7] /opt/mongodb/bin/mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x6c4) [0x97c4f4] /opt/mongodb/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x6fd) [0x97dbfd] /opt/mongodb/bin/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x35) [0x940f05] /opt/mongodb/bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x1740) [0x943a30] /opt/mongodb/bin/mongod() [0x889107]