summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2021-08-30 21:22:09 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-30 22:31:37 +0000
commit4a9c2e6f412619a50770ba867c11a6526840558f (patch)
tree99bd04bb4760db70dfaa728cd57b6174aacf81a4 /src/mongo/db
parentb15ce764a4ee7e3bff5d20193de9ba9b8c4e3494 (diff)
downloadmongo-4a9c2e6f412619a50770ba867c11a6526840558f.tar.gz
SERVER-58502 mongos hello loadBalanced option
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/client.cpp10
-rw-r--r--src/mongo/db/client.h8
-rw-r--r--src/mongo/db/repl/hello.idl6
3 files changed, 6 insertions, 18 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index f539798c87a..6982ad9e9db 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -47,7 +47,6 @@
#include "mongo/stdx/thread.h"
#include "mongo/util/concurrency/thread_name.h"
#include "mongo/util/exit.h"
-#include "mongo/util/fail_point.h"
#include "mongo/util/str.h"
namespace mongo {
@@ -55,8 +54,6 @@ namespace mongo {
namespace {
thread_local ServiceContext::UniqueClient currentClient;
-MONGO_FAIL_POINT_DEFINE(clientIsFromLoadBalancer);
-
void invariantNoCurrentClient() {
invariant(!haveClient(),
str::stream() << "Already have client on this thread: " //
@@ -203,11 +200,4 @@ Client* ThreadClient::get() const {
return &cc();
}
-bool Client::isFromLoadBalancer() const {
- if (MONGO_unlikely(clientIsFromLoadBalancer.shouldFail())) {
- return true;
- }
- return _isFromLoadBalancer;
-}
-
} // namespace mongo
diff --git a/src/mongo/db/client.h b/src/mongo/db/client.h
index dd7cf1107a3..67b8ed959d5 100644
--- a/src/mongo/db/client.h
+++ b/src/mongo/db/client.h
@@ -260,11 +260,6 @@ public:
_supportsHello = newVal;
}
- /**
- * Returns whether the connection was established through a load balancer.
- */
- bool isFromLoadBalancer() const;
-
private:
friend class ServiceContext;
friend class ThreadClient;
@@ -309,9 +304,6 @@ private:
bool _supportsHello = false;
UUID _uuid;
-
- // Whether the connection was established through a load balancer
- const bool _isFromLoadBalancer = false;
};
/**
diff --git a/src/mongo/db/repl/hello.idl b/src/mongo/db/repl/hello.idl
index a3e7392585b..90e7c329bc5 100644
--- a/src/mongo/db/repl/hello.idl
+++ b/src/mongo/db/repl/hello.idl
@@ -121,6 +121,9 @@ structs:
msg:
type: string
optional: true
+ serviceId:
+ type: objectid
+ optional: true
##
## ReplicationInfo
##
@@ -252,3 +255,6 @@ commands:
speculativeAuthenticate:
type: object
optional: true
+ loadBalanced:
+ type: bool
+ optional: true