aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorchernyak <chernyak@yandex-team.ru>2022-02-10 16:50:29 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:29 +0300
commit27d9c978ef36b8d6a70f60a38957f25d75192f70 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp
parentf2b67f65c49b38a882b6407926cece6fe49bd066 (diff)
downloadydb-27d9c978ef36b8d6a70f60a38957f25d75192f70.tar.gz
Restoring authorship annotation for <chernyak@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/messagebus/locator.cpp26
-rw-r--r--library/cpp/messagebus/oldmodule/module.cpp10
-rw-r--r--library/cpp/messagebus/oldmodule/module.h6
-rw-r--r--library/cpp/messagebus/session.cpp2
-rw-r--r--library/cpp/messagebus/test/helper/example.h4
-rw-r--r--library/cpp/messagebus/test/perftest/perftest.cpp2
-rw-r--r--library/cpp/messagebus/test/ut/one_way_ut.cpp6
7 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/messagebus/locator.cpp b/library/cpp/messagebus/locator.cpp
index e7e1244060..e38a35c426 100644
--- a/library/cpp/messagebus/locator.cpp
+++ b/library/cpp/messagebus/locator.cpp
@@ -136,7 +136,7 @@ namespace NBus {
TBusLocator::TServiceId TBusLocator::GetServiceId(const char* name) {
const char* c = ServiceIdSet.insert(name).first->c_str();
return (ui64)c;
- }
+ }
int TBusLocator::RegisterBreak(TBusService service, const TVector<TBusKey>& starts, const TNetAddr& addr) {
TGuard<TMutex> G(Lock);
@@ -261,16 +261,16 @@ namespace NBus {
const TItem& item = *it;
addrs.push_back(item.Addr);
}
-
+
if (addrs.size() == 0) {
return -1;
}
return (int)addrs.size();
- }
+ }
int TBusLocator::Locate(TBusService service, TBusKey key, TNetAddr* addr) {
TGuard<TMutex> G(Lock);
-
+
TServiceId serviceId = GetServiceId(service);
TItems::const_iterator it;
@@ -299,7 +299,7 @@ namespace NBus {
if (item.ServiceId != serviceId) {
break;
}
-
+
if (IsLocal(item.Addr)) {
if (port != 0 && port != GetAddrPort(item.Addr)) {
Y_ASSERT(0 && "Can't decide which port to use.");
@@ -308,15 +308,15 @@ namespace NBus {
port = GetAddrPort(item.Addr);
}
}
-
+
return port;
- }
+ }
int TBusLocator::GetLocalAddresses(TBusService service, TVector<TNetAddr>& addrs) {
TGuard<TMutex> G(Lock);
TServiceId serviceId = GetServiceId(service);
TItems::const_iterator it;
-
+
for (it = Items.lower_bound(TItem(serviceId, 0, 0, TNetAddr())); it != Items.end(); ++it) {
const TItem& item = *it;
if (item.ServiceId != serviceId) {
@@ -386,7 +386,7 @@ namespace NBus {
}
Register(service, start, end, addr);
return 0;
- }
+ }
int TBusLocator::Register(TBusService service, TBusKey start, TBusKey end, const TNetworkAddress& na, EIpVersion requireVersion /*= EIP_VERSION_4*/, EIpVersion preferVersion /*= EIP_VERSION_ANY*/) {
TNetAddr addr(na, requireVersion, preferVersion); // throws
@@ -396,7 +396,7 @@ namespace NBus {
int TBusLocator::Register(TBusService service, TBusKey start, TBusKey end, const TNetAddr& addr) {
TGuard<TMutex> G(Lock);
-
+
TServiceId serviceId = GetServiceId(service);
TItems::const_iterator it;
@@ -416,12 +416,12 @@ namespace NBus {
Items.insert(itemToReg);
return 0;
}
-
+
int TBusLocator::Unregister(TBusService service, TBusKey start, TBusKey end) {
TGuard<TMutex> G(Lock);
TServiceId serviceId = GetServiceId(service);
Items.erase(TItem(serviceId, start, end, TNetAddr()));
return 0;
- }
-
+ }
+
}
diff --git a/library/cpp/messagebus/oldmodule/module.cpp b/library/cpp/messagebus/oldmodule/module.cpp
index 406724127c..24bd778799 100644
--- a/library/cpp/messagebus/oldmodule/module.cpp
+++ b/library/cpp/messagebus/oldmodule/module.cpp
@@ -402,7 +402,7 @@ namespace NBus {
DoCallReplyHandler(call);
Pending.erase(Pending.begin() + it);
}
- }
+ }
return Pending.size() > 0;
}
@@ -603,8 +603,8 @@ namespace NBus {
strReturn += call.GetStatus(flags);
}
return strReturn;
- }
-
+ }
+
TString TJobState::GetStatus(unsigned flags) {
Y_UNUSED(flags);
TString strReturn;
@@ -616,7 +616,7 @@ namespace NBus {
ToString(Status).data());
return strReturn;
}
-
+
//////////////////////////////////////////////////////////////////////
void TBusModuleImpl::CancelJob(TBusJob* job, EMessageStatus status) {
@@ -857,7 +857,7 @@ void TModuleClientHandler::OnReply(TAutoPtr<TBusMessage> req, TAutoPtr<TBusMessa
Y_ASSERT(job->Job->Message != req.Get());
job->EnqueueAndSchedule(TJobResponseMessage(req.Release(), resp.Release(), MESSAGE_OK));
job->UnRef();
-}
+}
void TModuleClientHandler::OnMessageSentOneWay(TAutoPtr<TBusMessage> req) {
TJobRunner* job = GetJob(req.Get());
diff --git a/library/cpp/messagebus/oldmodule/module.h b/library/cpp/messagebus/oldmodule/module.h
index 8625012e0f..8d1c4a5d52 100644
--- a/library/cpp/messagebus/oldmodule/module.h
+++ b/library/cpp/messagebus/oldmodule/module.h
@@ -127,7 +127,7 @@ namespace NBus {
}
UseAddr = !!addr;
}
-
+
public:
TString GetStatus(unsigned flags);
};
@@ -270,7 +270,7 @@ namespace NBus {
/// return human reabable status of this job
virtual TString GetStatus(unsigned flags);
-
+
/// set sleep time for job
void Sleep(int milliSeconds);
@@ -372,7 +372,7 @@ namespace NBus {
/// get status of all jobs in flight
TString GetStatus(unsigned flags = 0);
-
+
/// called when application is about to start
virtual bool StartInput();
/// called when application is about to exit
diff --git a/library/cpp/messagebus/session.cpp b/library/cpp/messagebus/session.cpp
index 98136adb61..46a7ece6a8 100644
--- a/library/cpp/messagebus/session.cpp
+++ b/library/cpp/messagebus/session.cpp
@@ -44,7 +44,7 @@ namespace NBus {
GetConnectSyscallsNumBulkForTest({addr}, MakeArrayRef(&r, 1));
return r;
}
-
+
// Split 'host' into name and port taking into account that host can be specified
// as ipv6 address ('[<ipv6 address]:port' notion).
bool SplitHost(const TString& host, TString* hostName, TString* portNum) {
diff --git a/library/cpp/messagebus/test/helper/example.h b/library/cpp/messagebus/test/helper/example.h
index 51ca899a21..26b7475308 100644
--- a/library/cpp/messagebus/test/helper/example.h
+++ b/library/cpp/messagebus/test/helper/example.h
@@ -80,7 +80,7 @@ namespace NBus {
void SendMessages(size_t count, const TNetAddr* addr = nullptr);
void SendMessages(size_t count, const TNetAddr& addr);
-
+
void ResetCounters();
void WaitReplies();
EMessageStatus WaitForError();
@@ -113,7 +113,7 @@ namespace NBus {
const TBusServerSessionConfig& sessionConfig = TBusServerSessionConfig());
TExampleServer(unsigned port, const char* name = "TExampleServer");
-
+
~TExampleServer() override;
public:
diff --git a/library/cpp/messagebus/test/perftest/perftest.cpp b/library/cpp/messagebus/test/perftest/perftest.cpp
index 8f89bec439..8489319278 100644
--- a/library/cpp/messagebus/test/perftest/perftest.cpp
+++ b/library/cpp/messagebus/test/perftest/perftest.cpp
@@ -514,7 +514,7 @@ TSimpleSharedPtr<TPerftestUsingModule> ServerUsingModule;
TVector<TSimpleSharedPtr<TPerftestClient>> Clients;
TMutex ClientsLock;
-void stopsignal(int /*sig*/) {
+void stopsignal(int /*sig*/) {
fprintf(stderr, "\n-------------------- exiting ------------------\n");
TheExit = true;
StopEvent.Signal();
diff --git a/library/cpp/messagebus/test/ut/one_way_ut.cpp b/library/cpp/messagebus/test/ut/one_way_ut.cpp
index 4106acf56b..9c21227e2b 100644
--- a/library/cpp/messagebus/test/ut/one_way_ut.cpp
+++ b/library/cpp/messagebus/test/ut/one_way_ut.cpp
@@ -59,9 +59,9 @@ struct NullClient : TBusClientHandlerError {
/// register source/client session
Session = TBusClientSession::Create(&Proto, this, sessionConfig, Queue);
-
- /// register service, announce to clients via LocatorService
- Session->RegisterService("localhost");
+
+ /// register service, announce to clients via LocatorService
+ Session->RegisterService("localhost");
}
~NullClient() override {