diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
commit | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch) | |
tree | 506dac10f5df94fab310584ee51b24fc5a081c22 /library/cpp/actors | |
parent | 2d37894b1b037cf24231090eda8589bbb44fb6fc (diff) | |
download | ydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors')
-rw-r--r-- | library/cpp/actors/core/actor_coroutine.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/event.cpp | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/event.h | 8 | ||||
-rw-r--r-- | library/cpp/actors/core/event_local.h | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/event_pb.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/event_pb.h | 30 | ||||
-rw-r--r-- | library/cpp/actors/core/event_pb_payload_ut.cpp | 6 | ||||
-rw-r--r-- | library/cpp/actors/core/events.h | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/events_undelivered.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/hfunc.h | 6 | ||||
-rw-r--r-- | library/cpp/actors/core/log_settings.cpp | 12 | ||||
-rw-r--r-- | library/cpp/actors/core/log_settings.h | 16 | ||||
-rw-r--r-- | library/cpp/actors/core/mon.h | 8 | ||||
-rw-r--r-- | library/cpp/actors/core/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/actors/interconnect/interconnect_handshake.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/interconnect/ut/lib/node.h | 6 | ||||
-rw-r--r-- | library/cpp/actors/interconnect/ut/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/actors/protos/services_common.proto | 12 | ||||
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.cpp | 10 |
19 files changed, 69 insertions, 69 deletions
diff --git a/library/cpp/actors/core/actor_coroutine.cpp b/library/cpp/actors/core/actor_coroutine.cpp index 0ab4d2b24d..a287823028 100644 --- a/library/cpp/actors/core/actor_coroutine.cpp +++ b/library/cpp/actors/core/actor_coroutine.cpp @@ -21,7 +21,7 @@ namespace NActors { : Stack(stackSize) , AllowUnhandledPoisonPill(allowUnhandledPoisonPill) , AllowUnhandledDtor(allowUnhandledDtor) - , FiberClosure{this, TArrayRef(Stack.Begin(), Stack.End())} + , FiberClosure{this, TArrayRef(Stack.Begin(), Stack.End())} , FiberContext(FiberClosure) { #ifndef NDEBUG diff --git a/library/cpp/actors/core/event.cpp b/library/cpp/actors/core/event.cpp index 33f8ce2aaf..95dd27a3bd 100644 --- a/library/cpp/actors/core/event.cpp +++ b/library/cpp/actors/core/event.cpp @@ -16,7 +16,7 @@ namespace NActors { } if (Event) { TAllocChunkSerializer serializer; - Event->SerializeToArcadiaStream(&serializer); + Event->SerializeToArcadiaStream(&serializer); auto chainBuf = serializer.Release(Event->IsExtendedFormat()); Event.Reset(); return chainBuf; @@ -29,7 +29,7 @@ namespace NActors { return Buffer; if (Event) { TAllocChunkSerializer serializer; - Event->SerializeToArcadiaStream(&serializer); + Event->SerializeToArcadiaStream(&serializer); Buffer = serializer.Release(Event->IsExtendedFormat()); return Buffer; } diff --git a/library/cpp/actors/core/event.h b/library/cpp/actors/core/event.h index 6ff02aaf94..e4b957e08f 100644 --- a/library/cpp/actors/core/event.h +++ b/library/cpp/actors/core/event.h @@ -15,7 +15,7 @@ namespace NActors { class ISerializerToStream { public: - virtual bool SerializeToArcadiaStream(TChunkSerializer*) const = 0; + virtual bool SerializeToArcadiaStream(TChunkSerializer*) const = 0; }; class IEventBase @@ -35,7 +35,7 @@ namespace NActors { return 0; } virtual ui32 Type() const = 0; - virtual bool SerializeToArcadiaStream(TChunkSerializer*) const = 0; + virtual bool SerializeToArcadiaStream(TChunkSerializer*) const = 0; virtual bool IsSerializable() const = 0; virtual bool IsExtendedFormat() const { return false; @@ -318,7 +318,7 @@ namespace NActors { TString ToStringHeader() const override { \ return TString(header); \ } \ - bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \ + bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \ Y_FAIL("Local event " #eventType " is not serializable"); \ } \ static IEventBase* Load(NActors::TEventSerializedData*) { \ @@ -332,7 +332,7 @@ namespace NActors { TString ToStringHeader() const override { \ return TString(header); \ } \ - bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \ + bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \ return true; \ } \ static IEventBase* Load(NActors::TEventSerializedData*) { \ diff --git a/library/cpp/actors/core/event_local.h b/library/cpp/actors/core/event_local.h index 2845aa94dd..55694fb36b 100644 --- a/library/cpp/actors/core/event_local.h +++ b/library/cpp/actors/core/event_local.h @@ -13,7 +13,7 @@ namespace NActors { return TypeName<TEv>(); } - bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override { + bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override { Y_FAIL("Serialization of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType); } @@ -54,7 +54,7 @@ namespace NActors { return header; } - bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override { + bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override { static_assert(sizeof(TEv) == sizeof(TEventSimple<TEv, TEventType>), "Descendant should be an empty class"); return true; } diff --git a/library/cpp/actors/core/event_pb.cpp b/library/cpp/actors/core/event_pb.cpp index 018ff9ac34..b0eec9be3d 100644 --- a/library/cpp/actors/core/event_pb.cpp +++ b/library/cpp/actors/core/event_pb.cpp @@ -173,7 +173,7 @@ namespace NActors { void TCoroutineChunkSerializer::DoRun() { while (!CancelFlag) { Y_VERIFY(Event); - SerializationSuccess = Event->SerializeToArcadiaStream(this); + SerializationSuccess = Event->SerializeToArcadiaStream(this); Event = nullptr; if (!CancelFlag) { // cancel flag may have been received during serialization InnerContext.SwitchTo(BufFeedContext); diff --git a/library/cpp/actors/core/event_pb.h b/library/cpp/actors/core/event_pb.h index d7546b901a..f40504a2d6 100644 --- a/library/cpp/actors/core/event_pb.h +++ b/library/cpp/actors/core/event_pb.h @@ -3,8 +3,8 @@ #include "event.h" #include "event_load.h" -#include <google/protobuf/io/zero_copy_stream.h> -#include <google/protobuf/arena.h> +#include <google/protobuf/io/zero_copy_stream.h> +#include <google/protobuf/arena.h> #include <library/cpp/actors/protos/actors.pb.h> #include <util/generic/deque.h> #include <util/system/context.h> @@ -26,12 +26,12 @@ namespace NActors { bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; - int64_t ByteCount() const override { - return TotalByteCount; - } + int64_t ByteCount() const override { + return TotalByteCount; + } private: - int64_t TotalByteCount = 0; + int64_t TotalByteCount = 0; }; class TChunkSerializer : public NProtoBuf::io::ZeroCopyOutputStream { @@ -47,9 +47,9 @@ namespace NActors { public: bool Next(void** data, int* size) override; void BackUp(int count) override; - int64_t ByteCount() const override { - return Buffers->GetSize(); - } + int64_t ByteCount() const override { + return Buffers->GetSize(); + } bool WriteAliasedRaw(const void* data, int size) override; // WARNING: these methods require owner to retain ownership and immutability of passed objects @@ -90,9 +90,9 @@ namespace NActors { bool Next(void** data, int* size) override; void BackUp(int count) override; - int64_t ByteCount() const override { - return TotalSerializedDataSize; - } + int64_t ByteCount() const override { + return TotalSerializedDataSize; + } bool WriteAliasedRaw(const void* data, int size) override; bool AllowsAliasing() const override; @@ -166,7 +166,7 @@ namespace NActors { return static_cast<bool>(Payload); } - bool SerializeToArcadiaStream(TChunkSerializer* chunker) const override { + bool SerializeToArcadiaStream(TChunkSerializer* chunker) const override { // serialize payload first if (Payload) { void *data; @@ -471,8 +471,8 @@ namespace NActors { return GetRecord().ShortDebugString(); } - bool SerializeToArcadiaStream(TChunkSerializer* chunker) const override { - return chunker->WriteString(&PreSerializedData) && TBase::SerializeToArcadiaStream(chunker); + bool SerializeToArcadiaStream(TChunkSerializer* chunker) const override { + return chunker->WriteString(&PreSerializedData) && TBase::SerializeToArcadiaStream(chunker); } ui32 CalculateSerializedSize() const override { diff --git a/library/cpp/actors/core/event_pb_payload_ut.cpp b/library/cpp/actors/core/event_pb_payload_ut.cpp index eab007bc15..11c2c27481 100644 --- a/library/cpp/actors/core/event_pb_payload_ut.cpp +++ b/library/cpp/actors/core/event_pb_payload_ut.cpp @@ -49,7 +49,7 @@ Y_UNIT_TEST_SUITE(TEventProtoWithPayload) { msg.Record.AddSomeData(MakeString((size1 + size2) % 50 + 11)); auto serializer = MakeHolder<TAllocChunkSerializer>(); - msg.SerializeToArcadiaStream(serializer.Get()); + msg.SerializeToArcadiaStream(serializer.Get()); auto buffers = serializer->Release(msg.IsExtendedFormat()); UNIT_ASSERT_VALUES_EQUAL(buffers->GetSize(), msg.CalculateSerializedSize()); TString ser = buffers->GetString(); @@ -127,14 +127,14 @@ Y_UNIT_TEST_SUITE(TEventProtoWithPayload) { Y_PROTOBUF_SUPPRESS_NODISCARD msg.SerializeToString(&e1.PreSerializedData); auto serializer1 = MakeHolder<TAllocChunkSerializer>(); - e1.SerializeToArcadiaStream(serializer1.Get()); + e1.SerializeToArcadiaStream(serializer1.Get()); auto buffers1 = serializer1->Release(e1.IsExtendedFormat()); UNIT_ASSERT_VALUES_EQUAL(buffers1->GetSize(), e1.CalculateSerializedSize()); TString ser1 = buffers1->GetString(); TEvMessageWithPayload e2(msg); auto serializer2 = MakeHolder<TAllocChunkSerializer>(); - e2.SerializeToArcadiaStream(serializer2.Get()); + e2.SerializeToArcadiaStream(serializer2.Get()); auto buffers2 = serializer2->Release(e2.IsExtendedFormat()); UNIT_ASSERT_VALUES_EQUAL(buffers2->GetSize(), e2.CalculateSerializedSize()); TString ser2 = buffers2->GetString(); diff --git a/library/cpp/actors/core/events.h b/library/cpp/actors/core/events.h index 702cf50fad..3e6170891b 100644 --- a/library/cpp/actors/core/events.h +++ b/library/cpp/actors/core/events.h @@ -63,7 +63,7 @@ namespace NActors { return "THelloWorld::Blob"; } - bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { + bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { return serializer->WriteString(&Blob); } @@ -150,7 +150,7 @@ namespace NActors { {} TString ToStringHeader() const override; - bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override; + bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override; static IEventBase* Load(TEventSerializedData* bufs); bool IsSerializable() const override; diff --git a/library/cpp/actors/core/events_undelivered.cpp b/library/cpp/actors/core/events_undelivered.cpp index 23deaffd10..1612fabfe4 100644 --- a/library/cpp/actors/core/events_undelivered.cpp +++ b/library/cpp/actors/core/events_undelivered.cpp @@ -6,7 +6,7 @@ namespace NActors { return "TSystem::Undelivered"; } - bool TEvents::TEvUndelivered::SerializeToArcadiaStream(TChunkSerializer *serializer) const { + bool TEvents::TEvUndelivered::SerializeToArcadiaStream(TChunkSerializer *serializer) const { Y_VERIFY(!Unsure); // these are local-only events generated by Interconnect return serializer->WriteString(&Data); } diff --git a/library/cpp/actors/core/hfunc.h b/library/cpp/actors/core/hfunc.h index 26f3c65013..9a3c6de777 100644 --- a/library/cpp/actors/core/hfunc.h +++ b/library/cpp/actors/core/hfunc.h @@ -3,7 +3,7 @@ #include "actor.h" #include "executor_thread.h" -#include <util/system/defaults.h> +#include <util/system/defaults.h> #define HFunc(TEvType, HandleFunc) \ case TEvType::EventType: { \ @@ -21,7 +21,7 @@ #define HFuncTraced(TEvType, HandleFunc) \ case TEvType::EventType: { \ - TRACE_EVENT_TYPE(Y_STRINGIZE(TEvType)); \ + TRACE_EVENT_TYPE(Y_STRINGIZE(TEvType)); \ TEvType::TPtr* x = reinterpret_cast<TEvType::TPtr*>(&ev); \ HandleFunc(*x, ctx); \ break; \ @@ -29,7 +29,7 @@ #define hFuncTraced(TEvType, HandleFunc) \ case TEvType::EventType: { \ - TRACE_EVENT_TYPE(Y_STRINGIZE(TEvType)); \ + TRACE_EVENT_TYPE(Y_STRINGIZE(TEvType)); \ typename TEvType::TPtr* x = reinterpret_cast<typename TEvType::TPtr*>(&ev); \ HandleFunc(*x); \ break; \ diff --git a/library/cpp/actors/core/log_settings.cpp b/library/cpp/actors/core/log_settings.cpp index f52f2fc5d2..6f8019c47f 100644 --- a/library/cpp/actors/core/log_settings.cpp +++ b/library/cpp/actors/core/log_settings.cpp @@ -52,15 +52,15 @@ namespace NActors { Y_VERIFY(minVal >= 0, "NLog::TSettings: minVal must be non-negative"); Y_VERIFY(maxVal > minVal, "NLog::TSettings: maxVal must be greater than minVal"); - // update bounds + // update bounds if (!MaxVal || minVal < MinVal) { MinVal = minVal; } - if (!MaxVal || maxVal > MaxVal) { + if (!MaxVal || maxVal > MaxVal) { MaxVal = maxVal; - // expand ComponentNames to the new bounds + // expand ComponentNames to the new bounds auto oldMask = Mask; Mask = PowerOf2Mask(MaxVal); @@ -79,10 +79,10 @@ namespace NActors { ComponentNames.resize(Mask + 1); } - // assign new names but validate if newly added members were not used before + // assign new names but validate if newly added members were not used before for (int i = minVal; i <= maxVal; i++) { - Y_VERIFY(!ComponentNames[i], "component name at %d already set: %s", - i, ComponentNames[i].data()); + Y_VERIFY(!ComponentNames[i], "component name at %d already set: %s", + i, ComponentNames[i].data()); ComponentNames[i] = func(i); } } diff --git a/library/cpp/actors/core/log_settings.h b/library/cpp/actors/core/log_settings.h index 7fe4504edd..cae7002c8b 100644 --- a/library/cpp/actors/core/log_settings.h +++ b/library/cpp/actors/core/log_settings.h @@ -110,14 +110,14 @@ namespace NActors { void Append(EComponent minVal, EComponent maxVal, EComponentToStringFunc func); template <typename T> - void Append(T minVal, T maxVal, const TString& (*func)(T)) { - Append( - static_cast<EComponent>(minVal), - static_cast<EComponent>(maxVal), - [func](EComponent c) -> const TString& { - return func(static_cast<T>(c)); - } - ); + void Append(T minVal, T maxVal, const TString& (*func)(T)) { + Append( + static_cast<EComponent>(minVal), + static_cast<EComponent>(maxVal), + [func](EComponent c) -> const TString& { + return func(static_cast<T>(c)); + } + ); } inline bool Satisfies(EPriority priority, EComponent component, ui64 sampleBy = 0) const { diff --git a/library/cpp/actors/core/mon.h b/library/cpp/actors/core/mon.h index c450f2338e..6c6c9a8907 100644 --- a/library/cpp/actors/core/mon.h +++ b/library/cpp/actors/core/mon.h @@ -111,7 +111,7 @@ namespace NActors { return "TEvRemoteHttpInfo"; } - bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { + bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { return serializer->WriteString(&Query); } @@ -148,7 +148,7 @@ namespace NActors { return "TEvRemoteHttpInfoRes"; } - bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { + bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { return serializer->WriteString(&Html); } @@ -180,7 +180,7 @@ namespace NActors { return "TEvRemoteJsonInfoRes"; } - bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { + bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { return serializer->WriteString(&Json); } @@ -212,7 +212,7 @@ namespace NActors { return "TEvRemoteBinaryInfoRes"; } - bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { + bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override { return serializer->WriteString(&Blob); } diff --git a/library/cpp/actors/core/ya.make b/library/cpp/actors/core/ya.make index 880a9d00db..2f8322aa66 100644 --- a/library/cpp/actors/core/ya.make +++ b/library/cpp/actors/core/ya.make @@ -11,7 +11,7 @@ IF (PROFILE_MEMORY_ALLOCATIONS) CFLAGS(-DPROFILE_MEMORY_ALLOCATIONS) ENDIF() -IF (ALLOCATOR == "B" OR ALLOCATOR == "BS" OR ALLOCATOR == "C") +IF (ALLOCATOR == "B" OR ALLOCATOR == "BS" OR ALLOCATOR == "C") CXXFLAGS(-DBALLOC) PEERDIR( library/cpp/balloc/optional diff --git a/library/cpp/actors/interconnect/interconnect_handshake.cpp b/library/cpp/actors/interconnect/interconnect_handshake.cpp index 9ede998d8e..03ae76b38a 100644 --- a/library/cpp/actors/interconnect/interconnect_handshake.cpp +++ b/library/cpp/actors/interconnect/interconnect_handshake.cpp @@ -6,7 +6,7 @@ #include <library/cpp/actors/protos/services_common.pb.h> #include <util/system/getpid.h> -#include <google/protobuf/text_format.h> +#include <google/protobuf/text_format.h> #include <variant> diff --git a/library/cpp/actors/interconnect/ut/lib/node.h b/library/cpp/actors/interconnect/ut/lib/node.h index ff30b1445e..dd44f2fa3b 100644 --- a/library/cpp/actors/interconnect/ut/lib/node.h +++ b/library/cpp/actors/interconnect/ut/lib/node.h @@ -74,9 +74,9 @@ public: loggerSettings->Append( NActorsServices::EServiceCommon_MIN, - NActorsServices::EServiceCommon_MAX, - NActorsServices::EServiceCommon_Name - ); + NActorsServices::EServiceCommon_MAX, + NActorsServices::EServiceCommon_Name + ); constexpr ui32 WilsonComponentId = 430; // NKikimrServices::WILSON static const TString WilsonComponentName = "WILSON"; diff --git a/library/cpp/actors/interconnect/ut/ya.make b/library/cpp/actors/interconnect/ut/ya.make index 2f5b13352e..c38a24a0c2 100644 --- a/library/cpp/actors/interconnect/ut/ya.make +++ b/library/cpp/actors/interconnect/ut/ya.make @@ -5,7 +5,7 @@ OWNER( g:kikimr ) -IF (SANITIZER_TYPE == "thread") +IF (SANITIZER_TYPE == "thread") TIMEOUT(1200) SIZE(LARGE) TAG(ya:fat) diff --git a/library/cpp/actors/protos/services_common.proto b/library/cpp/actors/protos/services_common.proto index afa0ec0073..4459c76ef2 100644 --- a/library/cpp/actors/protos/services_common.proto +++ b/library/cpp/actors/protos/services_common.proto @@ -3,8 +3,8 @@ option java_package = "ru.yandex.kikimr.proto"; // 0-255 range enum EServiceCommon { - // WARN: This must be the smallest value in the enumeration - + // WARN: This must be the smallest value in the enumeration + GLOBAL = 0; INTERCONNECT = 1; TEST = 2; @@ -14,8 +14,8 @@ enum EServiceCommon { INTERCONNECT_NETWORK = 6; INTERCONNECT_SESSION = 7; HTTP = 8; - - // This value is reserved boundary. Is must not be aliased with any values - // TODO: use reseved values upon protobuf update - // COMMON_END = 256; + + // This value is reserved boundary. Is must not be aliased with any values + // TODO: use reseved values upon protobuf update + // COMMON_END = 256; }; diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp index 6fa25b9965..3f70aa834e 100644 --- a/library/cpp/actors/testlib/test_runtime.cpp +++ b/library/cpp/actors/testlib/test_runtime.cpp @@ -497,11 +497,11 @@ namespace NActors { } void TTestActorRuntimeBase::InitNodeImpl(TNodeDataBase* node, size_t nodeIndex) { - node->LogSettings->Append( - NActorsServices::EServiceCommon_MIN, - NActorsServices::EServiceCommon_MAX, - NActorsServices::EServiceCommon_Name - ); + node->LogSettings->Append( + NActorsServices::EServiceCommon_MIN, + NActorsServices::EServiceCommon_MAX, + NActorsServices::EServiceCommon_Name + ); if (!UseRealThreads) { node->SchedulerPool.Reset(CreateExecutorPoolStub(this, nodeIndex, node, 0)); |