diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-04-23 17:50:55 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-04-23 18:02:53 -0400 |
commit | ab8295bf7cc572a391e8c364b5291f1d9b3b0720 (patch) | |
tree | 440f00fab6ef56747c46bdc995fc41a07aa45845 /src/mongo/dbtests/perftests.cpp | |
parent | 1f24d43e419b674bfe866bdebf8224d44fa163b0 (diff) | |
download | mongo-ab8295bf7cc572a391e8c364b5291f1d9b3b0720.tar.gz |
Revert "SERVER-18131 Clean up LastError."
This reverts commit 54c25da33ec7270295c8948f6a51376ec4fd278c and
commit c952a9396a1843aa45d6afa3c6785dec607de112.
Diffstat (limited to 'src/mongo/dbtests/perftests.cpp')
-rw-r--r-- | src/mongo/dbtests/perftests.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp index 310ae31e3a1..90c0d74c632 100644 --- a/src/mongo/dbtests/perftests.cpp +++ b/src/mongo/dbtests/perftests.cpp @@ -49,7 +49,6 @@ #include <mutex> #include "mongo/config.h" -#include "mongo/db/client.h" #include "mongo/db/db.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/json.h" @@ -92,10 +91,12 @@ namespace PerfTests { class ClientBase { public: ClientBase() : _client(&_txn) { - mongo::LastError::get(_txn.getClient()).reset(); + _prevError = mongo::lastError._get( false ); + mongo::lastError.release(); + mongo::lastError.reset( new LastError() ); } virtual ~ClientBase() { - mongo::LastError::get(_txn.getClient()).reset(); + mongo::lastError.reset( _prevError ); } protected: @@ -113,6 +114,7 @@ namespace PerfTests { OperationContext* txn() { return &_txn; } private: + LastError* _prevError; OperationContextImpl _txn; DBDirectClient _client; }; |