|
mongod has an --objcheck option which validates BSON on writes. however there is overhead in doing this so it is not currently the default.
in this ticket it is proposed that when this setting is off, checking still occurs on a sampled basis. if sampled, the performance impact is negligible yet one will still get some notification if there is any invalid BSON.
a good approach might be to automatically check the first few operations on each connection, and then every 1000th operation.
if invalid, write something to the log file (ideally things like MMS would notice too; not sure how to do that)
in sharded environments, the check should happen in mongos. when done in mongod please do the check outside the lock.
|