diff options
author | Eric Milkie <milkie@10gen.com> | 2016-06-27 08:44:45 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2016-06-27 08:44:45 -0400 |
commit | 15d3d1f9bd151a2cd21fc7bee0bffc61caaaeb1d (patch) | |
tree | 459eb2373a65531ac145958a17afb3f6f46a8850 /src/mongo/db/dbcommands.cpp | |
parent | 52f29d0dc82569e3fb8a008c418f50be2bc61844 (diff) | |
download | mongo-r3.3.9.tar.gz |
Revert "SERVER-24494 Implemented parsing for linearizable read concern."r3.3.9
This reverts commit cd5b90cfe19732cd576fc7b55e935fd4c74d187b.
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index ecf5b9b7cb0..9b5a6c3c6c8 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -1461,6 +1461,7 @@ bool Command::run(OperationContext* txn, replyBuilder->setMetadata(rpc::makeEmptyMetadata()); return result; } + if (!supportsReadConcern()) { // Only return an error if a non-nullish readConcern was parsed, but do not process // readConcern regardless. @@ -1497,11 +1498,11 @@ bool Command::run(OperationContext* txn, return result; } } + if ((replCoord->getReplicationMode() == repl::ReplicationCoordinator::Mode::modeReplSet || testingSnapshotBehaviorInIsolation) && - (readConcernArgs.getLevel() == repl::ReadConcernLevel::kMajorityReadConcern || - readConcernArgs.getLevel() == repl::ReadConcernLevel::kLinearizableReadConcern)) { + readConcernArgs.getLevel() == repl::ReadConcernLevel::kMajorityReadConcern) { // ReadConcern Majority is not supported in ProtocolVersion 0. if (!testingSnapshotBehaviorInIsolation && !replCoord->isV1ElectionProtocol()) { auto result = appendCommandStatus( @@ -1538,15 +1539,6 @@ bool Command::run(OperationContext* txn, } } } - - if (readConcernArgs.getLevel() == repl::ReadConcernLevel::kLinearizableReadConcern) { - uassert(ErrorCodes::FailedToParse, - "afterOpTime not compatible with read concern level linearizable", - readConcernArgs.getOpTime().isNull()); - uassert(ErrorCodes::NotMaster, - "cannot satisfy linearizable read concern on non-primary node", - replCoord->getMemberState().primary()); - } } // run expects non-const bsonobj @@ -1559,7 +1551,6 @@ bool Command::run(OperationContext* txn, StatusWith<WriteConcernOptions> wcResult = extractWriteConcern(txn, cmd, db, this->supportsWriteConcern(cmd)); - if (!wcResult.isOK()) { auto result = appendCommandStatus(inPlaceReplyBob, wcResult.getStatus()); inPlaceReplyBob.doneFast(); |