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/db/dbdirectclient.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/db/dbdirectclient.cpp')
-rw-r--r-- | src/mongo/db/dbdirectclient.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp index 3aee1750172..41b75377060 100644 --- a/src/mongo/db/dbdirectclient.cpp +++ b/src/mongo/db/dbdirectclient.cpp @@ -33,7 +33,6 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/instance.h" -#include "mongo/db/lasterror.h" #include "mongo/db/operation_context.h" #include "mongo/util/log.h" @@ -123,7 +122,9 @@ namespace mongo { bool assertOk, string* actualServer) { DirectClientScope directClientScope(_txn); - LastError::get(_txn->getClient()).startRequest(); + if (lastError._get()) { + lastError.startRequest(toSend, lastError._get()); + } DbResponse dbResponse; assembleResponse(_txn, toSend, dbResponse, dummyHost); @@ -138,7 +139,9 @@ namespace mongo { void DBDirectClient::say(Message& toSend, bool isRetry, string* actualServer) { DirectClientScope directClientScope(_txn); - LastError::get(_txn->getClient()).startRequest(); + if (lastError._get()) { + lastError.startRequest(toSend, lastError._get()); + } DbResponse dbResponse; assembleResponse(_txn, toSend, dbResponse, dummyHost); |