summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-05-08 16:04:09 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-05-08 16:04:09 +0000
commit5f524cf8b3c4257fe267a6e894e838ab63e6be25 (patch)
treeef0b9258abddedd1025c3601f4252379a9e64f5d /searchcore
parentadefed58438494c8dbd07542eaf6fdf900db74fa (diff)
Use 2 thransport threads for proton rpc.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
index 2d63f192189..822451f351c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
@@ -6,6 +6,8 @@
#include <vespa/searchcore/proton/matchengine/matchengine.h>
#include <vespa/vespalib/util/closuretask.h>
#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/transport.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.rtchooks");
@@ -194,8 +196,9 @@ RPCHooksBase::Params::~Params() = default;
RPCHooksBase::RPCHooksBase(Params &params)
: _proton(params.proton),
- _docsumByRPC(new DocsumByRPC(_proton.getDocsumBySlime())),
- _orb(std::make_unique<FRT_Supervisor>()),
+ _docsumByRPC(std::make_unique<DocsumByRPC>(_proton.getDocsumBySlime())),
+ _transport(std::make_unique<FNET_Transport>(2)),
+ _orb(std::make_unique<FRT_Supervisor>(_transport.get(), &_proton.getThreadPool())),
_proto_rpc_adapter(std::make_unique<ProtoRpcAdapter>(
_proton.get_search_server(),
_proton.get_docsum_server(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h
index ad0a69fcd55..f16237381d6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h
+++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h
@@ -12,6 +12,8 @@
#include <mutex>
#include <condition_variable>
+class FNET_Transport;
+
namespace proton {
class Proton;
@@ -64,6 +66,7 @@ private:
Proton & _proton;
std::unique_ptr<DocsumByRPC> _docsumByRPC;
+ std::unique_ptr<FNET_Transport> _transport;
std::unique_ptr<FRT_Supervisor> _orb;
std::unique_ptr<ProtoRpcAdapter> _proto_rpc_adapter;
slobrok::api::RegisterAPI _regAPI;