diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-05-08 16:04:09 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-05-08 16:04:09 +0000 |
commit | 5f524cf8b3c4257fe267a6e894e838ab63e6be25 (patch) | |
tree | ef0b9258abddedd1025c3601f4252379a9e64f5d /searchcore/src | |
parent | adefed58438494c8dbd07542eaf6fdf900db74fa (diff) |
Use 2 thransport threads for proton rpc.
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp | 7 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h | 3 |
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 ¶ms) : _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; |