summaryrefslogtreecommitdiff
path: root/src/mongo/s/async_requests_sender.cpp
diff options
context:
space:
mode:
authorNathan Myers <nathan.myers@10gen.com>2017-09-25 15:53:59 -0400
committerNathan Myers <nathan.myers@10gen.com>2017-09-25 15:53:59 -0400
commitd7aca6435e8ccc89005a97dc585dfbe429a17dec (patch)
tree8f42ebe1db5e80b71d5e97730747971acea7fd02 /src/mongo/s/async_requests_sender.cpp
parent829c1d6afe8177433192e6af84bf4536c330caee (diff)
downloadmongo-d7aca6435e8ccc89005a97dc585dfbe429a17dec.tar.gz
SERVER-30838 Remove _inlock names in sharding subsystem
Diffstat (limited to 'src/mongo/s/async_requests_sender.cpp')
-rw-r--r--src/mongo/s/async_requests_sender.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/s/async_requests_sender.cpp b/src/mongo/s/async_requests_sender.cpp
index 4821fb0f504..0dc955fe119 100644
--- a/src/mongo/s/async_requests_sender.cpp
+++ b/src/mongo/s/async_requests_sender.cpp
@@ -77,7 +77,7 @@ AsyncRequestsSender::AsyncRequestsSender(OperationContext* opCtx,
// We lock so that no callbacks signal the notification until after we are done scheduling
// requests, to prevent signaling the notification twice, which is illegal.
stdx::lock_guard<stdx::mutex> lk(_mutex);
- _scheduleRequests_inlock();
+ _scheduleRequests(lk);
}
AsyncRequestsSender::~AsyncRequestsSender() {
_cancelPendingRequests();
@@ -142,7 +142,7 @@ boost::optional<AsyncRequestsSender::Response> AsyncRequestsSender::_ready() {
_notification.emplace();
if (!_stopRetrying) {
- _scheduleRequests_inlock();
+ _scheduleRequests(lk);
}
// Check if any remote is ready.
@@ -171,7 +171,7 @@ boost::optional<AsyncRequestsSender::Response> AsyncRequestsSender::_ready() {
return boost::none;
}
-void AsyncRequestsSender::_scheduleRequests_inlock() {
+void AsyncRequestsSender::_scheduleRequests(WithLock lk) {
invariant(!_stopRetrying);
// Schedule remote work on hosts for which we have not sent a request or need to retry.
for (size_t i = 0; i < _remotes.size(); ++i) {
@@ -212,7 +212,7 @@ void AsyncRequestsSender::_scheduleRequests_inlock() {
// If the remote does not have a response or pending request, schedule remote work for it.
if (!remote.swResponse && !remote.cbHandle.isValid()) {
- auto scheduleStatus = _scheduleRequest_inlock(i);
+ auto scheduleStatus = _scheduleRequest(lk, i);
if (!scheduleStatus.isOK()) {
remote.swResponse = std::move(scheduleStatus);
// Signal the notification indicating the remote had an error (we need to do this
@@ -226,7 +226,7 @@ void AsyncRequestsSender::_scheduleRequests_inlock() {
}
}
-Status AsyncRequestsSender::_scheduleRequest_inlock(size_t remoteIndex) {
+Status AsyncRequestsSender::_scheduleRequest(WithLock, size_t remoteIndex) {
auto& remote = _remotes[remoteIndex];
invariant(!remote.cbHandle.isValid());