Details
-
Task
-
Resolution: Done
-
Major - P3
-
Legacy C++ Implementation
Description
When mongorestore is run with object check (default in 2.4) it performs the check as follows:
if ( _objcheck && ! o.valid() ) {
|
The problem here is that o.valid() is implemented as follows and consumes the Status object returned by validateBSON
bool BSONObj::valid() const {
|
return validateBSON( objdata(), objsize() ).isOK();
|
}
|
mongorestore should instead call validateBSON directly and if Status.isOK() is false print Status.code() & Status.codeString() to help in pinpointing BSON corruption.
Attachments
Issue Links
- is related to
-
TOOLS-105 mongorestore stops after encountering invalid bson object
-
- Closed
-