diff options
author | Dianna Hohensee <dianna.hohensee@mongodb.com> | 2021-06-28 22:42:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-04 17:15:32 +0000 |
commit | 1746aef0112ada4c01fc3c17d482e68eed1ae3ee (patch) | |
tree | 70dad84ae9faa46ccafb80a33136b8ee80f8b559 /src/mongo/db/server_options.h | |
parent | 9ae4eb2650e5086058a88452f6a72efc5bd95766 (diff) | |
download | mongo-1746aef0112ada4c01fc3c17d482e68eed1ae3ee.tar.gz |
SERVER-50761 Crash the shell on invalid BSON errors on server responses from outgoing connections in
all of the jstestfuzz test suites.
Combine a new shell parameter --crashOnInvalidBSONError with --objcheck in the shell for all
jstestfuzz test suites. --objcheck in the shell turns on BSON validation on responses from outgoing
connections to the server. --crashOnInvalidBSONError crashes the shell if that extra BSON validation
encounters an error, and attempts to log the invalid BSON for debugging.
Diffstat (limited to 'src/mongo/db/server_options.h')
-rw-r--r-- | src/mongo/db/server_options.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/server_options.h b/src/mongo/db/server_options.h index c8aa3037866..14a4416f0a8 100644 --- a/src/mongo/db/server_options.h +++ b/src/mongo/db/server_options.h @@ -72,6 +72,10 @@ struct ServerGlobalParams { bool objcheck = true; // --objcheck + // Shell parameter, used for testing only, to tell the shell to crash on InvalidBSON errors. + // Can be paired with --objcheck so that extra BSON validation occurs. + bool crashOnInvalidBSONError = false; // --crashOnInvalidBSONError + int defaultProfile = 0; // --profile boost::optional<BSONObj> defaultProfileFilter; int slowMS = 100; // --time in ms that is "slow" |