diff options
author | spuchin <spuchin@yandex-team.ru> | 2022-02-10 16:48:16 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:16 +0300 |
commit | aab7e440a1750bc0841b355dcc4f388f31e5f5e3 (patch) | |
tree | c4ea3bd0ac108e34c329b483ba6ce11e25dfd005 /library/cpp | |
parent | 47dc960d070b29aa93972d1d49088393af89383f (diff) | |
download | ydb-aab7e440a1750bc0841b355dcc4f388f31e5f5e3.tar.gz |
Restoring authorship annotation for <spuchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/actors/core/callstack.cpp | 8 | ||||
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.cpp | 38 | ||||
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.h | 8 | ||||
-rw-r--r-- | library/cpp/grpc/server/grpc_counters.h | 10 | ||||
-rw-r--r-- | library/cpp/grpc/server/grpc_request.h | 18 | ||||
-rw-r--r-- | library/cpp/grpc/server/grpc_request_base.h | 4 | ||||
-rw-r--r-- | library/cpp/json/easy_parse/json_easy_parser.cpp | 2 |
7 files changed, 44 insertions, 44 deletions
diff --git a/library/cpp/actors/core/callstack.cpp b/library/cpp/actors/core/callstack.cpp index 9297c1a079..491c19a4e6 100644 --- a/library/cpp/actors/core/callstack.cpp +++ b/library/cpp/actors/core/callstack.cpp @@ -24,8 +24,8 @@ namespace NActors { } ++ActorBackTraceEnableCounter; - } - + } + void DisableActorCallstack() { --ActorBackTraceEnableCounter; @@ -35,13 +35,13 @@ namespace NActors { PreviousFormatBackTrace = 0; } } - + TCallstack::TCallstack() : BeginIdx(0) , Size(0) , LinesToSkip(0) { - } + } void TCallstack::SetLinesToSkip() { TTrace record; diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp index 6fa25b9965..73ba61ed97 100644 --- a/library/cpp/actors/testlib/test_runtime.cpp +++ b/library/cpp/actors/testlib/test_runtime.cpp @@ -479,7 +479,7 @@ namespace NActors { , EventFilterFunc(&TTestActorRuntimeBase::DefaultFilterFunc) , ScheduledEventFilterFunc(&TTestActorRuntimeBase::NopFilterFunc) , RegistrationObserver(&TTestActorRuntimeBase::DefaultRegistrationObserver) - , CurrentDispatchContext(nullptr) + , CurrentDispatchContext(nullptr) { SetDispatcherRandomSeed(TInstant::Now(), 0); EnableActorCallstack(); @@ -775,19 +775,19 @@ namespace NActors { void TTestActorRuntimeBase::SetLogBackend(const TAutoPtr<TLogBackend> logBackend) { Y_VERIFY(!IsInitialized); - TGuard<TMutex> guard(Mutex); - LogBackend = logBackend; - } - + TGuard<TMutex> guard(Mutex); + LogBackend = logBackend; + } + void TTestActorRuntimeBase::SetLogPriority(NActors::NLog::EComponent component, NActors::NLog::EPriority priority) { TGuard<TMutex> guard(Mutex); for (ui32 nodeIndex = 0; nodeIndex < NodeCount; ++nodeIndex) { TNodeDataBase* node = Nodes[FirstNodeId + nodeIndex].Get(); TString explanation; - auto status = node->LogSettings->SetLevel(priority, component, explanation); - if (status) { - Y_FAIL("SetLogPriority failed: %s", explanation.c_str()); - } + auto status = node->LogSettings->SetLevel(priority, component, explanation); + if (status) { + Y_FAIL("SetLogPriority failed: %s", explanation.c_str()); + } } } @@ -1050,19 +1050,19 @@ namespace NActors { struct TDispatchContextSetter { TDispatchContextSetter(TTestActorRuntimeBase& runtime, TDispatchContext& lastContext) - : Runtime(runtime) + : Runtime(runtime) { - lastContext.PrevContext = Runtime.CurrentDispatchContext; - Runtime.CurrentDispatchContext = &lastContext; + lastContext.PrevContext = Runtime.CurrentDispatchContext; + Runtime.CurrentDispatchContext = &lastContext; } ~TDispatchContextSetter() { - Runtime.CurrentDispatchContext = Runtime.CurrentDispatchContext->PrevContext; + Runtime.CurrentDispatchContext = Runtime.CurrentDispatchContext->PrevContext; } TTestActorRuntimeBase& Runtime; - } DispatchContextSetter(*this, localContext); - + } DispatchContextSetter(*this, localContext); + TInstant dispatchTime = TInstant::MicroSeconds(0); TInstant deadline = dispatchTime + DispatchTimeout; const TDuration scheduledEventsInspectInterval = TDuration::MilliSeconds(10); @@ -1781,7 +1781,7 @@ namespace NActors { , AdditionalActors(additionalActors) , Context(context) , HasReply(false) - , Runtime(runtime) + , Runtime(runtime) , ReplyChecker(createReplyChecker()) { if (IsSync) { @@ -1835,14 +1835,14 @@ namespace NActors { int count = 100; while (!HasReply && count > 0) { try { - Runtime->DispatchEvents(DelegateeOptions); + Runtime->DispatchEvents(DelegateeOptions); } catch (TEmptyEventQueueException&) { count--; Cerr << "No reply" << Endl; } } - Runtime->UpdateCurrentTime(Runtime->GetCurrentTime() + TDuration::MicroSeconds(1000)); + Runtime->UpdateCurrentTime(Runtime->GetCurrentTime() + TDuration::MicroSeconds(1000)); } } } @@ -1877,7 +1877,7 @@ namespace NActors { TStrandingDecoratorFactory(TTestActorRuntimeBase* runtime, TReplyCheckerCreator createReplyChecker) : Context(new TStrandingActorDecoratorContext()) - , Runtime(runtime) + , Runtime(runtime) , CreateReplyChecker(createReplyChecker) { } diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h index 26e3b45c98..e3facb3cd8 100644 --- a/library/cpp/actors/testlib/test_runtime.h +++ b/library/cpp/actors/testlib/test_runtime.h @@ -226,7 +226,7 @@ namespace NActors { DispatchedEventsLimit = limit; } TDuration SetReschedulingDelay(TDuration delay); - void SetLogBackend(const TAutoPtr<TLogBackend> logBackend); + void SetLogBackend(const TAutoPtr<TLogBackend> logBackend); void SetLogPriority(NActors::NLog::EComponent component, NActors::NLog::EPriority priority); TIntrusivePtr<ITimeProvider> GetTimeProvider(); TInstant GetCurrentTime() const; @@ -466,7 +466,7 @@ namespace NActors { const TVector<ui64>& GetTxAllocatorTabletIds() const { return TxAllocatorTabletIds; } void SetTxAllocatorTabletIds(const TVector<ui64>& ids) { TxAllocatorTabletIds = ids; } - + void SetUseRealInterconnect() { UseRealInterconnect = true; } @@ -529,7 +529,7 @@ namespace NActors { TActorId CurrentRecipient; ui64 DispatcherRandomSeed; TIntrusivePtr<IRandomProvider> DispatcherRandomProvider; - TAutoPtr<TLogBackend> LogBackend; + TAutoPtr<TLogBackend> LogBackend; bool NeedMonitoring; TIntrusivePtr<IRandomProvider> RandomProvider; @@ -626,7 +626,7 @@ namespace NActors { TSet<TActorId> ScheduleWhiteList; THashMap<TActorId, TActorId> ScheduleWhiteListParent; THashMap<TActorId, TString> ActorNames; - TDispatchContext* CurrentDispatchContext; + TDispatchContext* CurrentDispatchContext; TVector<ui64> TxAllocatorTabletIds; static ui32 NextNodeId; diff --git a/library/cpp/grpc/server/grpc_counters.h b/library/cpp/grpc/server/grpc_counters.h index 0b6c36c84c..e8f0ca2179 100644 --- a/library/cpp/grpc/server/grpc_counters.h +++ b/library/cpp/grpc/server/grpc_counters.h @@ -97,11 +97,11 @@ public: *InflyRequestBytes += requestSize; } - void FinishProcessing(ui32 requestSize, ui32 responseSize, bool ok, ui32 status, - TDuration requestDuration) override - { - Y_UNUSED(status); - + void FinishProcessing(ui32 requestSize, ui32 responseSize, bool ok, ui32 status, + TDuration requestDuration) override + { + Y_UNUSED(status); + InflyCounter->Dec(); *InflyRequestBytes -= requestSize; *ResponseBytes += responseSize; diff --git a/library/cpp/grpc/server/grpc_request.h b/library/cpp/grpc/server/grpc_request.h index 5bd8d3902b..851fe11583 100644 --- a/library/cpp/grpc/server/grpc_request.h +++ b/library/cpp/grpc/server/grpc_request.h @@ -180,13 +180,13 @@ public: return AuthState_; } - void Reply(NProtoBuf::Message* resp, ui32 status) override { - ResponseStatus = status; + void Reply(NProtoBuf::Message* resp, ui32 status) override { + ResponseStatus = status; WriteDataOk(resp); } - void Reply(grpc::ByteBuffer* resp, ui32 status) override { - ResponseStatus = status; + void Reply(grpc::ByteBuffer* resp, ui32 status) override { + ResponseStatus = status; WriteByteDataOk(resp); } @@ -427,8 +427,8 @@ private: ok ? "true" : "false", this->Context.peer().c_str()); //PrintBackTrace(); DecRequest(); - Counters_->FinishProcessing(RequestSize, ResponseSize, ok, ResponseStatus, - TDuration::Seconds(RequestTimer.Passed())); + Counters_->FinishProcessing(RequestSize, ResponseSize, ok, ResponseStatus, + TDuration::Seconds(RequestTimer.Passed())); return false; } @@ -437,8 +437,8 @@ private: ok ? "true" : "false", this->Context.peer().c_str()); if (!SkipUpdateCountersOnError) { DecRequest(); - Counters_->FinishProcessing(RequestSize, ResponseSize, ok, ResponseStatus, - TDuration::Seconds(RequestTimer.Passed())); + Counters_->FinishProcessing(RequestSize, ResponseSize, ok, ResponseStatus, + TDuration::Seconds(RequestTimer.Passed())); } return false; } @@ -498,7 +498,7 @@ private: TOnNextReply NextReplyCb_; ui32 RequestSize = 0; ui32 ResponseSize = 0; - ui32 ResponseStatus = 0; + ui32 ResponseStatus = 0; THPTimer RequestTimer; TAuthState AuthState_ = 0; bool RequestRegistered_ = false; diff --git a/library/cpp/grpc/server/grpc_request_base.h b/library/cpp/grpc/server/grpc_request_base.h index fcfce1c181..740c3c4fdd 100644 --- a/library/cpp/grpc/server/grpc_request_base.h +++ b/library/cpp/grpc/server/grpc_request_base.h @@ -58,11 +58,11 @@ public: //! Send common response (The request shoult be created for protobuf response type) //! Implementation can swap protobuf message - virtual void Reply(NProtoBuf::Message* resp, ui32 status = 0) = 0; + virtual void Reply(NProtoBuf::Message* resp, ui32 status = 0) = 0; //! Send serialised response (The request shoult be created for bytes response type) //! Implementation can swap ByteBuffer - virtual void Reply(grpc::ByteBuffer* resp, ui32 status = 0) = 0; + virtual void Reply(grpc::ByteBuffer* resp, ui32 status = 0) = 0; //! Send grpc UNAUTHENTICATED status virtual void ReplyUnauthenticated(const TString& in) = 0; diff --git a/library/cpp/json/easy_parse/json_easy_parser.cpp b/library/cpp/json/easy_parse/json_easy_parser.cpp index 3c781f544b..e6c898ba15 100644 --- a/library/cpp/json/easy_parse/json_easy_parser.cpp +++ b/library/cpp/json/easy_parse/json_easy_parser.cpp @@ -114,7 +114,7 @@ namespace NJson { , HasFormatError(false) { for (size_t n = 0; n < Parent.Fields.size(); ++n) { - if (!Parent.Fields[n].Path.empty() && Parent.Fields[n].Path.back().Type == NImpl::ARRAY) + if (!Parent.Fields[n].Path.empty() && Parent.Fields[n].Path.back().Type == NImpl::ARRAY) ShouldUpdateOnArrayChange = true; } } |