aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect
diff options
context:
space:
mode:
authorAndrey Khalyavin <halyavin@gmail.com>2022-02-10 16:46:29 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:29 +0300
commitf773626848a7c7456803654292e716b83d69cc12 (patch)
treedb052dfcf9134f492bdbb962cb6c16cea58e1ed3 /library/cpp/actors/interconnect
parentf43ab775d197d300eb67bd4497632b909cd7c2a5 (diff)
downloadydb-f773626848a7c7456803654292e716b83d69cc12.tar.gz
Restoring authorship annotation for Andrey Khalyavin <halyavin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/interconnect')
-rw-r--r--library/cpp/actors/interconnect/event_holder_pool.h8
-rw-r--r--library/cpp/actors/interconnect/interconnect_common.h6
-rw-r--r--library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp6
3 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/actors/interconnect/event_holder_pool.h b/library/cpp/actors/interconnect/event_holder_pool.h
index b6090a3bc8..90ce486e9e 100644
--- a/library/cpp/actors/interconnect/event_holder_pool.h
+++ b/library/cpp/actors/interconnect/event_holder_pool.h
@@ -12,12 +12,12 @@ namespace NActors {
std::list<TEventHolder> FreeQueue;
TStackVec<THolder<IEventBase>, MaxEvents> Events;
TStackVec<THolder<TEventSerializedData>, MaxEvents> Buffers;
- std::shared_ptr<std::atomic<TAtomicBase>> Counter;
+ std::shared_ptr<std::atomic<TAtomicBase>> Counter;
ui64 NumBytes = 0;
~TEvFreeItems() {
if (Counter) {
- TAtomicBase res = Counter->fetch_sub(NumBytes) - NumBytes;
+ TAtomicBase res = Counter->fetch_sub(NumBytes) - NumBytes;
Y_VERIFY(res >= 0);
}
}
@@ -26,8 +26,8 @@ namespace NActors {
Y_VERIFY(!Counter);
const auto& counter = common->DestructorQueueSize;
const auto& max = common->MaxDestructorQueueSize;
- if (counter && (TAtomicBase)(counter->fetch_add(NumBytes) + NumBytes) > max) {
- counter->fetch_sub(NumBytes);
+ if (counter && (TAtomicBase)(counter->fetch_add(NumBytes) + NumBytes) > max) {
+ counter->fetch_sub(NumBytes);
return false;
}
Counter = counter;
diff --git a/library/cpp/actors/interconnect/interconnect_common.h b/library/cpp/actors/interconnect/interconnect_common.h
index 285709a00c..73b94931a8 100644
--- a/library/cpp/actors/interconnect/interconnect_common.h
+++ b/library/cpp/actors/interconnect/interconnect_common.h
@@ -13,8 +13,8 @@
#include "logging.h"
#include "event_filter.h"
-#include <atomic>
-
+#include <atomic>
+
namespace NActors {
enum class EEncryptionMode {
DISABLED, // no encryption is required at all
@@ -78,7 +78,7 @@ namespace NActors {
TInterconnectSettings Settings;
TRegisterMonPageCallback RegisterMonPage;
TActorId DestructorId;
- std::shared_ptr<std::atomic<TAtomicBase>> DestructorQueueSize;
+ std::shared_ptr<std::atomic<TAtomicBase>> DestructorQueueSize;
TAtomicBase MaxDestructorQueueSize = 1024 * 1024 * 1024;
TString ClusterUUID;
TVector<TString> AcceptUUID;
diff --git a/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp b/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
index e6b2bd4e4c..5686d50590 100644
--- a/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
@@ -5,14 +5,14 @@
#include <library/cpp/monlib/dynamic_counters/counters.h>
#include <library/cpp/actors/interconnect/event_holder_pool.h>
-#include <atomic>
-
+#include <atomic>
+
using namespace NActors;
template<typename T>
TEventHolderPool Setup(T&& callback) {
auto common = MakeIntrusive<TInterconnectProxyCommon>();
- common->DestructorQueueSize = std::make_shared<std::atomic<TAtomicBase>>();
+ common->DestructorQueueSize = std::make_shared<std::atomic<TAtomicBase>>();
common->MaxDestructorQueueSize = 1024 * 1024;
return TEventHolderPool(common, callback);
}