summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-03-31 10:49:13 -0400
committerRandolph Tan <randolph@10gen.com>2014-03-31 15:48:02 -0400
commit1aa9b7b3749064a7fd150203102e142f5415754e (patch)
tree3f776284c09946eb225fabe23661ecc256d0308a
parent4f5e71237a70d7f5e1100f0b0a3b26700e945c84 (diff)
downloadmongo-1aa9b7b3749064a7fd150203102e142f5415754e.tar.gz
SERVER-13415 Strict validation of j / fsync to be boolean is backwards-breaking for some drivers
-rw-r--r--src/mongo/db/write_concern_options.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mongo/db/write_concern_options.cpp b/src/mongo/db/write_concern_options.cpp
index 848c4e4464c..ac21a01f87c 100644
--- a/src/mongo/db/write_concern_options.cpp
+++ b/src/mongo/db/write_concern_options.cpp
@@ -42,17 +42,9 @@ namespace mongo {
}
BSONElement jEl = obj["j"];
- if ( !jEl.eoo() && !jEl.isNumber() && jEl.type() != Bool ) {
- return Status( ErrorCodes::FailedToParse, "j must be numeric or a boolean value" );
- }
-
const bool j = jEl.trueValue();
BSONElement fsyncEl = obj["fsync"];
- if ( !fsyncEl.eoo() && !fsyncEl.isNumber() && fsyncEl.type() != Bool ) {
- return Status( ErrorCodes::FailedToParse, "fsync must be numeric or a boolean value" );
- }
-
const bool fsync = fsyncEl.trueValue();
if ( j && fsync )