diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2020-03-24 09:58:57 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-24 14:12:59 +0000 |
commit | aef2f4f5c62fe07842bbc861dddcb0ad2f9a9e16 (patch) | |
tree | 3bb06129a424d143f58b45021fd27e8d3687e900 /src/mongo/dbtests | |
parent | 13fa68bcc2cbe782076b46911723748547ca5dcd (diff) | |
download | mongo-aef2f4f5c62fe07842bbc861dddcb0ad2f9a9e16.tar.gz |
Revert "SERVER-45692 add explicit RWC to inter-node commands (even if merely kImplicitDefault)"
This reverts commit 81c6113198d2f5debf3da38a42bf61d7a079de2e.
We discovered that this commit introduces SERVER-47043, so it can't be
backported without it. Leaving all the backports for after 4.4.0-RC0 is
cut.
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/mock/mock_dbclient_connection.cpp | 27 | ||||
-rw-r--r-- | src/mongo/dbtests/mock/mock_dbclient_connection.h | 34 | ||||
-rw-r--r-- | src/mongo/dbtests/mock/mock_remote_db_server.cpp | 3 | ||||
-rw-r--r-- | src/mongo/dbtests/mock/mock_remote_db_server.h | 3 |
4 files changed, 20 insertions, 47 deletions
diff --git a/src/mongo/dbtests/mock/mock_dbclient_connection.cpp b/src/mongo/dbtests/mock/mock_dbclient_connection.cpp index b360a283e2d..3bb3a845d3e 100644 --- a/src/mongo/dbtests/mock/mock_dbclient_connection.cpp +++ b/src/mongo/dbtests/mock/mock_dbclient_connection.cpp @@ -105,8 +105,7 @@ std::unique_ptr<mongo::DBClientCursor> MockDBClientConnection::query( int nToSkip, const BSONObj* fieldsToReturn, int queryOptions, - int batchSize, - boost::optional<BSONObj> readConcernObj) { + int batchSize) { checkConnection(); try { @@ -118,8 +117,7 @@ std::unique_ptr<mongo::DBClientCursor> MockDBClientConnection::query( nToSkip, fieldsToReturn, queryOptions, - batchSize, - readConcernObj)); + batchSize)); BSONArray resultsInCursor; @@ -191,37 +189,26 @@ unsigned long long MockDBClientConnection::query( mongo::Query query, const mongo::BSONObj* fieldsToReturn, int queryOptions, - int batchSize, - boost::optional<BSONObj> readConcernObj) { - return DBClientBase::query( - f, nsOrUuid, query, fieldsToReturn, queryOptions, batchSize, readConcernObj); + int batchSize) { + return DBClientBase::query(f, nsOrUuid, query, fieldsToReturn, queryOptions, batchSize); } uint64_t MockDBClientConnection::getSockCreationMicroSec() const { return _sockCreationTime; } -void MockDBClientConnection::insert(const string& ns, - BSONObj obj, - int flags, - boost::optional<BSONObj> writeConcernObj) { +void MockDBClientConnection::insert(const string& ns, BSONObj obj, int flags) { invariant(_remoteServer); _remoteServer->insert(ns, obj, flags); } -void MockDBClientConnection::insert(const string& ns, - const vector<BSONObj>& objList, - int flags, - boost::optional<BSONObj> writeConcernObj) { +void MockDBClientConnection::insert(const string& ns, const vector<BSONObj>& objList, int flags) { for (vector<BSONObj>::const_iterator iter = objList.begin(); iter != objList.end(); ++iter) { insert(ns, *iter, flags); } } -void MockDBClientConnection::remove(const string& ns, - Query query, - int flags, - boost::optional<BSONObj> writeConcernObj) { +void MockDBClientConnection::remove(const string& ns, Query query, int flags) { invariant(_remoteServer); _remoteServer->remove(ns, query, flags); } diff --git a/src/mongo/dbtests/mock/mock_dbclient_connection.h b/src/mongo/dbtests/mock/mock_dbclient_connection.h index 4a7c4891db6..5a8d9fa727e 100644 --- a/src/mongo/dbtests/mock/mock_dbclient_connection.h +++ b/src/mongo/dbtests/mock/mock_dbclient_connection.h @@ -118,32 +118,21 @@ public: using DBClientBase::runCommandWithTarget; std::pair<rpc::UniqueReply, DBClientBase*> runCommandWithTarget(OpMsgRequest request) override; - std::unique_ptr<mongo::DBClientCursor> query( - const NamespaceStringOrUUID& nsOrUuid, - mongo::Query query = mongo::Query(), - int nToReturn = 0, - int nToSkip = 0, - const mongo::BSONObj* fieldsToReturn = nullptr, - int queryOptions = 0, - int batchSize = 0, - boost::optional<BSONObj> readConcernObj = boost::none) override; + std::unique_ptr<mongo::DBClientCursor> query(const NamespaceStringOrUUID& nsOrUuid, + mongo::Query query = mongo::Query(), + int nToReturn = 0, + int nToSkip = 0, + const mongo::BSONObj* fieldsToReturn = nullptr, + int queryOptions = 0, + int batchSize = 0) override; uint64_t getSockCreationMicroSec() const override; - void insert(const std::string& ns, - BSONObj obj, - int flags = 0, - boost::optional<BSONObj> writeConcernObj = boost::none) override; + void insert(const std::string& ns, BSONObj obj, int flags = 0) override; - void insert(const std::string& ns, - const std::vector<BSONObj>& objList, - int flags = 0, - boost::optional<BSONObj> writeConcernObj = boost::none) override; + void insert(const std::string& ns, const std::vector<BSONObj>& objList, int flags = 0) override; - void remove(const std::string& ns, - Query query, - int flags = 0, - boost::optional<BSONObj> writeConcernObj = boost::none) override; + void remove(const std::string& ns, Query query, int flags = 0) override; bool call(mongo::Message& toSend, mongo::Message& response, @@ -186,8 +175,7 @@ public: mongo::Query query, const mongo::BSONObj* fieldsToReturn = nullptr, int queryOptions = 0, - int batchSize = 0, - boost::optional<BSONObj> readConcernObj = boost::none) override; + int batchSize = 0) override; // // Unsupported methods (these are pure virtuals in the base class) diff --git a/src/mongo/dbtests/mock/mock_remote_db_server.cpp b/src/mongo/dbtests/mock/mock_remote_db_server.cpp index 9e37c54c23e..0f8c0f69d4d 100644 --- a/src/mongo/dbtests/mock/mock_remote_db_server.cpp +++ b/src/mongo/dbtests/mock/mock_remote_db_server.cpp @@ -181,8 +181,7 @@ mongo::BSONArray MockRemoteDBServer::query(MockRemoteDBServer::InstanceID id, int nToSkip, const BSONObj* fieldsToReturn, int queryOptions, - int batchSize, - boost::optional<BSONObj> readConcernObj) { + int batchSize) { checkIfUp(id); if (_delayMilliSec > 0) { diff --git a/src/mongo/dbtests/mock/mock_remote_db_server.h b/src/mongo/dbtests/mock/mock_remote_db_server.h index e346923acf2..db6361ac915 100644 --- a/src/mongo/dbtests/mock/mock_remote_db_server.h +++ b/src/mongo/dbtests/mock/mock_remote_db_server.h @@ -168,8 +168,7 @@ public: int nToSkip = 0, const mongo::BSONObj* fieldsToReturn = nullptr, int queryOptions = 0, - int batchSize = 0, - boost::optional<BSONObj> readConcernObj = boost::none); + int batchSize = 0); // // Getters |