diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-04-20 18:51:35 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-04-29 11:55:38 -0400 |
commit | da31be34dc6664d76868543e9ccdaecad4f504c6 (patch) | |
tree | cca380d1419bffe8371f24f73fca169a042b87e1 /src/mongo/s/commands/cluster_reset_error_cmd.cpp | |
parent | bdbe140e3cc502a58d50a8ec472bd9c05cf12e4f (diff) | |
download | mongo-da31be34dc6664d76868543e9ccdaecad4f504c6.tar.gz |
SERVER-18131 Clean up LastError.
Makes LastError a decoration on Client. Removes behavior that was specific to
the dbKillCursors wire protocol message into the processing for that message,
and out of last error. Simplifies lifetime of LastError. It always exists on
Clients, so there's no checking for its existence, and no passing it around
through parts of the networking library.
Diffstat (limited to 'src/mongo/s/commands/cluster_reset_error_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_reset_error_cmd.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/s/commands/cluster_reset_error_cmd.cpp b/src/mongo/s/commands/cluster_reset_error_cmd.cpp index 182daedaa66..8bc2af039f3 100644 --- a/src/mongo/s/commands/cluster_reset_error_cmd.cpp +++ b/src/mongo/s/commands/cluster_reset_error_cmd.cpp @@ -66,10 +66,7 @@ namespace { std::string& errmsg, BSONObjBuilder& result) { - LastError* le = lastError.get(); - if (le) { - le->reset(); - } + LastError::get(cc()).reset(); const std::set<std::string>* shards = ClusterLastErrorInfo::get(cc()).getPrevShardHosts(); |