diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2020-08-16 21:10:33 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-17 01:48:12 +0000 |
commit | 3cc779415f2777223b5549d3dfd1b85eef01842b (patch) | |
tree | e165efebd7b0d7d83c68f0de5d88d46b3ac2285e /src/mongo/db/stats | |
parent | ecd1e0b022a68110ada6517f84ffd91ea8a91bca (diff) | |
download | mongo-3cc779415f2777223b5549d3dfd1b85eef01842b.tar.gz |
Revert "SERVER-48693 Add network counter for cluster authentication"
This reverts commit 24dd72daae9e4cf59ad51910058bc111f20edbff.
Diffstat (limited to 'src/mongo/db/stats')
-rw-r--r-- | src/mongo/db/stats/counters.cpp | 28 | ||||
-rw-r--r-- | src/mongo/db/stats/counters.h | 7 |
2 files changed, 0 insertions, 35 deletions
diff --git a/src/mongo/db/stats/counters.cpp b/src/mongo/db/stats/counters.cpp index 4180275393b..63a0b6eb66d 100644 --- a/src/mongo/db/stats/counters.cpp +++ b/src/mongo/db/stats/counters.cpp @@ -244,24 +244,6 @@ Status AuthCounter::incAuthenticateSuccessful(const std::string& mechanism) try << " which is not enabled"}; } -Status AuthCounter::incClusterAuthenticateReceived(const std::string& mechanism) try { - _mechanisms.at(mechanism).clusterAuthenticate.received.fetchAndAddRelaxed(1); - return Status::OK(); -} catch (const std::out_of_range&) { - return {ErrorCodes::BadValue, - str::stream() << "Received authentication for mechanism " << mechanism - << " which is unknown or not enabled"}; -} - -Status AuthCounter::incClusterAuthenticateSuccessful(const std::string& mechanism) try { - _mechanisms.at(mechanism).clusterAuthenticate.successful.fetchAndAddRelaxed(1); - return Status::OK(); -} catch (const std::out_of_range&) { - return {ErrorCodes::BadValue, - str::stream() << "Received authentication for mechanism " << mechanism - << " which is not enabled"}; -} - /** * authentication: { * "mechanisms": { @@ -293,16 +275,6 @@ void AuthCounter::append(BSONObjBuilder* b) { } { - const auto received = it.second.clusterAuthenticate.received.load(); - const auto successful = it.second.clusterAuthenticate.successful.load(); - - BSONObjBuilder clusterAuthBuilder(mechBuilder.subobjStart(auth::kClusterAuthenticate)); - clusterAuthBuilder.append("received", received); - clusterAuthBuilder.append("successful", successful); - clusterAuthBuilder.done(); - } - - { const auto received = it.second.authenticate.received.load(); const auto successful = it.second.authenticate.successful.load(); diff --git a/src/mongo/db/stats/counters.h b/src/mongo/db/stats/counters.h index a202746be03..9b10cb2a049 100644 --- a/src/mongo/db/stats/counters.h +++ b/src/mongo/db/stats/counters.h @@ -226,9 +226,6 @@ public: Status incAuthenticateReceived(const std::string& mechanism); Status incAuthenticateSuccessful(const std::string& mechanism); - Status incClusterAuthenticateReceived(const std::string& mechanism); - Status incClusterAuthenticateSuccessful(const std::string& mechanism); - void append(BSONObjBuilder*); void initializeMechanismMap(const std::vector<std::string>&); @@ -243,10 +240,6 @@ private: AtomicWord<long long> received; AtomicWord<long long> successful; } authenticate; - struct { - AtomicWord<long long> received; - AtomicWord<long long> successful; - } clusterAuthenticate; }; using MechanismMap = std::map<std::string, MechanismData>; |