diff options
Diffstat (limited to 'src/mongo/s/batched_command_request.cpp')
-rw-r--r-- | src/mongo/s/batched_command_request.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/s/batched_command_request.cpp b/src/mongo/s/batched_command_request.cpp index 0a326937b77..fe38324c1f7 100644 --- a/src/mongo/s/batched_command_request.cpp +++ b/src/mongo/s/batched_command_request.cpp @@ -82,6 +82,20 @@ namespace mongo { return nss.toString(); } + bool BatchedCommandRequest::isVerboseWC() const { + if ( !isWriteConcernSet() ) { + return true; + } + + BSONObj writeConcern = getWriteConcern(); + BSONElement wElem = writeConcern["w"]; + if ( !wElem.isNumber() || wElem.Number() != 0 ) { + return true; + } + + return false; + } + void BatchedCommandRequest::cloneTo( BatchedCommandRequest* other ) const { other->_insertReq.reset(); other->_updateReq.reset(); |