summaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-24 15:21:14 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-02-24 15:21:14 +0000
commitc202a7cc45957ad2966e666e11b68990cfdeafe7 (patch)
tree189dd7db0cfd9102ce9e8a1eed476117dc51c743 /searchcore/src
parent1cfe9f4141b1f13607cb912d5439365b2ba9faf9 (diff)
We do not need to maintain a separate executor just for handling random manual getProtonStatus rpc calls. Just use the one that proton owns.
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp16
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h6
2 files changed, 2 insertions, 20 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
index 05c51fd30ba..9d0e7b5dbc0 100644
--- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
@@ -4,7 +4,6 @@
#include "proton.h"
#include <vespa/searchcore/proton/matchengine/matchengine.h>
#include <vespa/vespalib/util/lambdatask.h>
-#include <vespa/vespalib/util/size_literals.h>
#include <vespa/fnet/frt/supervisor.h>
#include <vespa/fnet/transport.h>
@@ -18,8 +17,6 @@ namespace {
using Pair = std::pair<string, string>;
-VESPA_THREAD_STACK_TAG(proton_rpc_executor)
-
}
namespace proton {
@@ -113,10 +110,7 @@ RPCHooksBase::RPCHooksBase(Params &params)
_proton.get_search_server(),
_proton.get_docsum_server(),
_proton.get_monitor_server(), *_orb)),
- _regAPI(*_orb, slobrok::ConfiguratorFactory(params.slobrok_config)),
- _stateLock(),
- _stateCond(),
- _executor(1u, 128_Ki, proton_rpc_executor)
+ _regAPI(*_orb, slobrok::ConfiguratorFactory(params.slobrok_config))
{ }
void
@@ -142,12 +136,6 @@ RPCHooksBase::close()
{
LOG(info, "shutting down monitoring interface");
_transport->ShutDown(true);
- _executor.shutdown();
- {
- std::lock_guard<std::mutex> guard(_stateLock);
- _stateCond.notify_all();
- }
- _executor.sync();
}
void
@@ -198,7 +186,7 @@ RPCHooksBase::rpc_GetProtonStatus(FRT_RPCRequest *req)
{
LOG(debug, "RPCHooksBase::rpc_GetProtonStatus started");
req->Detach();
- _executor.execute(makeLambdaTask([this, req]() { getProtonStatus(req); }));
+ letProtonDo(makeLambdaTask([this, req]() { getProtonStatus(req); }));
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h
index a396d0d0020..840ce4c2ec2 100644
--- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h
+++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h
@@ -5,10 +5,7 @@
#include <vespa/slobrok/sbregister.h>
#include <vespa/vespalib/util/executor.h>
#include <vespa/vespalib/stllike/string.h>
-#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/searchlib/engine/proto_rpc_adapter.h>
-#include <mutex>
-#include <condition_variable>
class FNET_Transport;
@@ -26,9 +23,6 @@ private:
std::unique_ptr<FRT_Supervisor> _orb;
std::unique_ptr<ProtoRpcAdapter> _proto_rpc_adapter;
slobrok::api::RegisterAPI _regAPI;
- std::mutex _stateLock;
- std::condition_variable _stateCond;
- vespalib::ThreadStackExecutor _executor;
void initRPC();
void letProtonDo(vespalib::Executor::Task::UP task);