diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2014-05-02 11:06:09 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2014-05-05 04:31:58 -0400 |
commit | c1155169f13efd52013f56265878f8beb714fef8 (patch) | |
tree | d25b7416ac896059a029c7e27733a53f26d031ec /src/mongo/db/repl | |
parent | cffe3c8bcfc12852b1413775c4b202ffcecdc46d (diff) | |
download | mongo-c1155169f13efd52013f56265878f8beb714fef8.tar.gz |
SERVER-13821 privatize SyncSourceFeedback's resetConnection()
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.cpp | 12 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.h | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 03487c8c155..58daadb7bf2 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -131,13 +131,13 @@ namespace mongo { log() << "replSet error while handshaking the upstream updater: " << res["errmsg"].valuestrsafe(); - resetConnection(); + _resetConnection(); return false; } } catch (const DBException& e) { log() << "SyncSourceFeedback error sending handshake: " << e.what() << endl; - resetConnection(); + _resetConnection(); return false; } } @@ -153,7 +153,7 @@ namespace mongo { string errmsg; if (!_connection->connect(hostName.c_str(), errmsg) || (getGlobalAuthorizationManager()->isAuthEnabled() && !replAuthenticate())) { - resetConnection(); + _resetConnection(); log() << "repl: " << errmsg << endl; return false; } @@ -214,12 +214,12 @@ namespace mongo { } catch (const DBException& e) { log() << "SyncSourceFeedback error sending update: " << e.what() << endl; - resetConnection(); + _resetConnection(); return false; } if (!ok) { log() << "SyncSourceFeedback error sending update, response: " << res.toString() <<endl; - resetConnection(); + _resetConnection(); return false; } return true; @@ -256,7 +256,7 @@ namespace mongo { } const Member* target = replset::BackgroundSync::get()->getSyncTarget(); if (_syncTarget != target) { - resetConnection(); + _resetConnection(); _syncTarget = target; } if (!hasConnection()) { diff --git a/src/mongo/db/repl/sync_source_feedback.h b/src/mongo/db/repl/sync_source_feedback.h index 79911a3685b..dd2bfbcf9b3 100644 --- a/src/mongo/db/repl/sync_source_feedback.h +++ b/src/mongo/db/repl/sync_source_feedback.h @@ -60,11 +60,6 @@ namespace mongo { updateMap(_me["_id"].OID(), ot); } - void resetConnection() { - LOG(1) << "resetting connection in sync source feedback"; - _connection.reset(); - } - /// Updates the _slaveMap to be forwarded to the sync target. void updateMap(const mongo::OID& rid, const OpTime& ot); @@ -74,6 +69,11 @@ namespace mongo { void run(); private: + void _resetConnection() { + LOG(1) << "resetting connection in sync source feedback"; + _connection.reset(); + } + /** * Authenticates _connection using the server's cluster-membership credentials. * |