diff options
author | Randolph Tan <randolph@10gen.com> | 2014-01-15 13:09:55 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-01-15 13:12:07 -0500 |
commit | 4e62d347f090ce1afd91dc59b3db2fab8f930bc0 (patch) | |
tree | f68f0c9eeb49cf76f9a851e0ee16e4ac01b95164 /src/mongo/s/cluster_write.cpp | |
parent | ecd69fcfb4c844835441c532ef07aac093db3459 (diff) | |
download | mongo-4e62d347f090ce1afd91dc59b3db2fab8f930bc0.tar.gz |
SERVER-11875 Make sure write concern is set before getting the value
Diffstat (limited to 'src/mongo/s/cluster_write.cpp')
-rw-r--r-- | src/mongo/s/cluster_write.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/s/cluster_write.cpp b/src/mongo/s/cluster_write.cpp index c3eff24450e..348c1c3104b 100644 --- a/src/mongo/s/cluster_write.cpp +++ b/src/mongo/s/cluster_write.cpp @@ -350,7 +350,9 @@ namespace mongo { bool verboseWC = request.isVerboseWC(); // We only support batch sizes of one and {w:0} write concern for config writes - if ( request.sizeWriteOps() != 1 || !validConfigWC( request.getWriteConcern() )) { + if ( request.sizeWriteOps() != 1 || + ( request.isWriteConcernSet() && + !validConfigWC( request.getWriteConcern() ))) { // Invalid config server write response->setOk( false ); response->setErrCode( ErrorCodes::InvalidOptions ); |