Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.2.3
-
None
-
None
-
ubuntu
-
ALL
Description
I'm in the process of upgrading from 2.2.3 to 2.4.5. I upgraded one cluster last week and another this week, and both times, when I elected the new primary, it turned out to be missing all the indexes for at least a couple of collections.
Here's a collection on the old primary:
mongodata3:SECONDARY> db["app_22d9b327-2c33-4296-bb50-48b6917b356f:_Installation"].stats()
|
{
|
"ns" : "appdata53.app_22d9b327-2c33-4296-bb50-48b6917b356f:_Installation",
|
"count" : 2962834,
|
"size" : 1011357036,
|
"avgObjSize" : 341.3478568154679,
|
"storageSize" : 1164914688,
|
"numExtents" : 18,
|
"nindexes" : 8,
|
"lastExtentSize" : 307515392,
|
"paddingFactor" : 1.0000000002533629,
|
"systemFlags" : 1,
|
"userFlags" : 0,
|
"totalIndexSize" : 1238917456,
|
"indexSizes" : {
|
"_id_" : 123800992,
|
"installationId_1_deviceToken_1" : 236245520,
|
"installationId_1" : 231871360,
|
"deviceToken_1" : 67214896,
|
"_updated_at_1" : 142589440,
|
"_created_at_1" : 96967360,
|
"timeZone_1__created_at_1" : 236220992,
|
"channels_1__created_at_1" : 104006896
|
},
|
"ok" : 1
|
}
|
and on the new one:
mongodata3:PRIMARY> db["app_22d9b327-2c33-4296-bb50-48b6917b356f:_Installation"].stats()
|
{
|
"ns" : "appdata53.app_22d9b327-2c33-4296-bb50-48b6917b356f:_Installation",
|
"count" : 2962834,
|
"size" : 861644152,
|
"avgObjSize" : 290.81755913426133,
|
"storageSize" : 965894144,
|
"numExtents" : 18,
|
"nindexes" : 1,
|
"lastExtentSize" : 256282624,
|
"paddingFactor" : 1.0000000002360774,
|
"systemFlags" : 1,
|
"userFlags" : 0,
|
"totalIndexSize" : 152073600,
|
"indexSizes" : {
|
"_id_" : 152073600
|
},
|
"ok" : 1
|
}
|
Not sure how many collections this has happened to, I only found these by visually scanning the logs for high nscanned numbers. I have tried grepping the logs for any indication of an index getting dropped, but there is nada.
I did run a compaction on all the collections a while back, but I checked for interrupted index builds at the time and didn't see anything. That's the only thing I can think of though, am I missing anything?