summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-03-06 11:42:42 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-03-06 15:11:11 +0000
commit793a0bbc6c8bedcf0ee5de51be687d760defcd57 (patch)
tree016f83e652b0734aa3555df9332c72f9a82ff424 /config
parent9a95875744e88f29cb4a78f8bb31bab13e7cec4d (diff)
use ref_counted in fnet
also get rid of some cleanup functions on reference counted classes enable specifying low-level parameters to addref/subref (cnt/reserve)
Diffstat (limited to 'config')
-rw-r--r--config/src/apps/vespa-configproxy-cmd/proxycmd.cpp4
-rw-r--r--config/src/apps/vespa-get-config/getconfig.cpp2
-rw-r--r--config/src/apps/vespa-ping-configproxy/pingproxy.cpp4
-rw-r--r--config/src/tests/frt/frt.cpp4
-rw-r--r--config/src/vespa/config/file_acquirer/file_acquirer.cpp4
-rw-r--r--config/src/vespa/config/frt/frtconfigrequest.cpp2
-rw-r--r--config/src/vespa/config/frt/frtconfigresponse.cpp4
-rw-r--r--config/src/vespa/config/frt/frtconnection.cpp8
8 files changed, 16 insertions, 16 deletions
diff --git a/config/src/apps/vespa-configproxy-cmd/proxycmd.cpp b/config/src/apps/vespa-configproxy-cmd/proxycmd.cpp
index 1d875e0ade2..2bc1c3e94d1 100644
--- a/config/src/apps/vespa-configproxy-cmd/proxycmd.cpp
+++ b/config/src/apps/vespa-configproxy-cmd/proxycmd.cpp
@@ -39,11 +39,11 @@ void ProxyCmd::invokeRPC() {
void ProxyCmd::finiRPC() {
if (_req != nullptr) {
- _req->SubRef();
+ _req->internal_subref();
_req = nullptr;
}
if (_target != nullptr) {
- _target->SubRef();
+ _target->internal_subref();
_target = NULL;
}
_server.reset();
diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp
index 03a049044ae..a31caefe054 100644
--- a/config/src/apps/vespa-get-config/getconfig.cpp
+++ b/config/src/apps/vespa-get-config/getconfig.cpp
@@ -85,7 +85,7 @@ void
GetConfig::finiRPC()
{
if (_target != nullptr) {
- _target->SubRef();
+ _target->internal_subref();
_target = nullptr;
}
_server.reset();
diff --git a/config/src/apps/vespa-ping-configproxy/pingproxy.cpp b/config/src/apps/vespa-ping-configproxy/pingproxy.cpp
index e8423eba233..83a10416852 100644
--- a/config/src/apps/vespa-ping-configproxy/pingproxy.cpp
+++ b/config/src/apps/vespa-ping-configproxy/pingproxy.cpp
@@ -59,7 +59,7 @@ void
PingProxy::finiRPC()
{
if (_target != nullptr) {
- _target->SubRef();
+ _target->internal_subref();
_target = nullptr;
}
_server.reset();
@@ -146,7 +146,7 @@ PingProxy::main(int argc, char **argv)
retval = 1;
}
}
- req->SubRef();
+ req->internal_subref();
finiRPC();
return retval;
}
diff --git a/config/src/tests/frt/frt.cpp b/config/src/tests/frt/frt.cpp
index 4e77b289f49..c5098d0e7a1 100644
--- a/config/src/tests/frt/frt.cpp
+++ b/config/src/tests/frt/frt.cpp
@@ -96,7 +96,7 @@ struct Response {
~RPCFixture() {
for (size_t i = 0; i < requests.size(); i++) {
- requests[i]->SubRef();
+ requests[i]->internal_subref();
}
}
};
@@ -340,7 +340,7 @@ struct V3RequestFixture {
}
~V3RequestFixture() {
- req->SubRef();
+ req->internal_subref();
}
void encodePayload(const char * payload, uint32_t payloadSize, uint32_t uncompressedSize, const CompressionType & compressionType) {
diff --git a/config/src/vespa/config/file_acquirer/file_acquirer.cpp b/config/src/vespa/config/file_acquirer/file_acquirer.cpp
index 4ee5b4aa4a9..f38875b5727 100644
--- a/config/src/vespa/config/file_acquirer/file_acquirer.cpp
+++ b/config/src/vespa/config/file_acquirer/file_acquirer.cpp
@@ -31,8 +31,8 @@ RpcFileAcquirer::wait_for(const vespalib::string &file_ref, double timeout_s)
LOG(warning, "could not acquire file '%s' (%d: %s)",
file_ref.c_str(), req->GetErrorCode(), req->GetErrorMessage());
}
- req->SubRef();
- target->SubRef();
+ req->internal_subref();
+ target->internal_subref();
return path;
}
diff --git a/config/src/vespa/config/frt/frtconfigrequest.cpp b/config/src/vespa/config/frt/frtconfigrequest.cpp
index 2106da64857..e7da9f53e97 100644
--- a/config/src/vespa/config/frt/frtconfigrequest.cpp
+++ b/config/src/vespa/config/frt/frtconfigrequest.cpp
@@ -17,7 +17,7 @@ FRTConfigRequest::FRTConfigRequest(Connection * connection, const ConfigKey & ke
FRTConfigRequest::~FRTConfigRequest()
{
- _request->SubRef();
+ _request->internal_subref();
}
bool
diff --git a/config/src/vespa/config/frt/frtconfigresponse.cpp b/config/src/vespa/config/frt/frtconfigresponse.cpp
index 43ae3f9b192..28c2825f71c 100644
--- a/config/src/vespa/config/frt/frtconfigresponse.cpp
+++ b/config/src/vespa/config/frt/frtconfigresponse.cpp
@@ -10,12 +10,12 @@ FRTConfigResponse::FRTConfigResponse(FRT_RPCRequest * request)
_responseState(EMPTY),
_returnValues(_request->GetReturn())
{
- _request->AddRef();
+ _request->internal_addref();
}
FRTConfigResponse::~FRTConfigResponse()
{
- _request->SubRef();
+ _request->internal_subref();
}
bool
diff --git a/config/src/vespa/config/frt/frtconnection.cpp b/config/src/vespa/config/frt/frtconnection.cpp
index be8ccead65c..ff2a82f855b 100644
--- a/config/src/vespa/config/frt/frtconnection.cpp
+++ b/config/src/vespa/config/frt/frtconnection.cpp
@@ -30,7 +30,7 @@ FRTConnection::~FRTConnection()
{
if (_target != nullptr) {
LOG(debug, "Shutting down %s", _address.c_str());
- _target->SubRef();
+ _target->internal_subref();
_target = nullptr;
}
}
@@ -42,10 +42,10 @@ FRTConnection::getTarget()
if (_target == nullptr) {
_target = _supervisor.GetTarget(_address.c_str());
} else if ( ! _target->IsValid()) {
- _target->SubRef();
+ _target->internal_subref();
_target = _supervisor.GetTarget(_address.c_str());
}
- _target->AddRef();
+ _target->internal_addref();
return _target;
}
@@ -54,7 +54,7 @@ FRTConnection::invoke(FRT_RPCRequest * req, duration timeout, FRT_IRequestWait *
{
FRT_Target * target = getTarget();
target->InvokeAsync(req, vespalib::to_s(timeout), waiter);
- target->SubRef();
+ target->internal_subref();
}
void