summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-24 18:35:09 +0100
committerGitHub <noreply@github.com>2022-02-24 18:35:09 +0100
commit435f2c992bc7338abdc759320ffeed0118e4bbb0 (patch)
tree669dbf906c322e58d5079ac80ffdd9c0a9f4d99e /searchcore
parenta3f504000cd7fd03f6b5d57edd0c9a93a5bfb703 (diff)
parentc202a7cc45957ad2966e666e11b68990cfdeafe7 (diff)
Merge pull request #21375 from vespa-engine/balder/gc-stray-executor
We do not need to maintain a separate executor just for handling rand…
Diffstat (limited to 'searchcore')
-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);