-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.4.29
-
Component/s: None
-
None
-
ALL
After continuously upgrading MongoDB from v3.4.24 to v4.4.29, the system encountered issues during runtime where MongoDB would automatically restart. The error logs are as follows:
Unknown macro: {"t"},"s":"F", "c":"-", "id":23079, "ctx":"conn317028","msg":"Invariant failure","attr":{"expr":"elt.type() != BSONType::Array","file":"src/mongo/db/index/btree_key_generator.cpp","line":75}}
Unknown macro: {"t"},"s":"F", "c":"-", "id":23080, "ctx":"conn317028","msg":"\n\n***aborting after invariant() failure\n\n"}
Unknown macro: {"t"},"s":"F", "c":"CONTROL", "id":4757800, "ctx":"conn317028","msg":"Writing fatal message","attr":{"message":"Got signal: 6 (Aborted).\n"}}
From the error logs, it seems likely that the issue is related to an incompatibility with indexes created in older versions. However, the complete `mongodb.log` file did not indicate which specific collection's index was causing the issue.
To resolve this, I had to drop all indexes in the database and recreate them, after which the problem stopped occurring.
I would like to know whether this is a historical bug in MongoDB or if it was caused by some other issue?
For more error log information, see the attachment. mongodb_error.log
- is related to
-
SERVER-58113 mongoDB crash after Invariant failure in btree_key_generator.cpp
- Closed