redact replaces BSONObj field values with the kRedactionDefaultMask string "###".
A redacted BSONObj can throw BSONObjectTooLarge if a valid BSONObj has many fields with values smaller than the kRedactionDefaultMask string size.
ex)
BSON("foodIsGood" << 1) is smaller than
redact(BSON("foodIsGood" << 1)) which yields BSON("foodIsGood": "###")
This can cause real problems on startup if, say, we try to apply a large oplog entry close to the limit full of arrays of ints that get expanded to "###" and cause the startup to fail with a DBException
- depends on
-
SERVER-57289 redact should not convert BSONArray into BSONObj
- Closed