diff options
author | babenko <babenko@yandex-team.com> | 2023-10-21 23:06:43 +0300 |
---|---|---|
committer | babenko <babenko@yandex-team.com> | 2023-10-21 23:25:17 +0300 |
commit | a991b019f74cbfe6efb40c3b68b46a1ac2a9bd09 (patch) | |
tree | 63e216429b3c6da303aaf3f89fd20c68a5d1eb8d /yt | |
parent | cd5a87da3e440378dd869e2447ecbd49e68a8c42 (diff) | |
download | ydb-a991b019f74cbfe6efb40c3b68b46a1ac2a9bd09.tar.gz |
Fix missing logging during world initialization
Diffstat (limited to 'yt')
-rw-r--r-- | yt/yt/core/ytree/ypath_client-inl.h | 16 | ||||
-rw-r--r-- | yt/yt/core/ytree/ypath_client.cpp | 14 | ||||
-rw-r--r-- | yt/yt/core/ytree/ypath_client.h | 12 |
3 files changed, 32 insertions, 10 deletions
diff --git a/yt/yt/core/ytree/ypath_client-inl.h b/yt/yt/core/ytree/ypath_client-inl.h index 4022ba82d9..5e5b32b810 100644 --- a/yt/yt/core/ytree/ypath_client-inl.h +++ b/yt/yt/core/ytree/ypath_client-inl.h @@ -10,12 +10,16 @@ namespace NYT::NYTree { template <class TTypedRequest> TFuture<TIntrusivePtr<typename TTypedRequest::TTypedResponse>> -ExecuteVerb(const IYPathServicePtr& service, const TIntrusivePtr<TTypedRequest>& request) +ExecuteVerb( + const IYPathServicePtr& service, + const TIntrusivePtr<TTypedRequest>& request, + NLogging::TLogger logger, + NLogging::ELogLevel logLevel) { using TTypedResponse = typename TTypedRequest::TTypedResponse; auto requestMessage = request->Serialize(); - return ExecuteVerb(service, requestMessage) + return ExecuteVerb(service, requestMessage, std::move(logger), logLevel) .Apply(BIND([] (const TSharedRefArray& responseMessage) -> TIntrusivePtr<TTypedResponse> { auto response = New<TTypedResponse>(); response->Deserialize(responseMessage); @@ -25,9 +29,13 @@ ExecuteVerb(const IYPathServicePtr& service, const TIntrusivePtr<TTypedRequest>& template <class TTypedRequest> TIntrusivePtr<typename TTypedRequest::TTypedResponse> -SyncExecuteVerb(const IYPathServicePtr& service, const TIntrusivePtr<TTypedRequest>& request) +SyncExecuteVerb( + const IYPathServicePtr& service, + const TIntrusivePtr<TTypedRequest>& request, + NLogging::TLogger logger, + NLogging::ELogLevel logLevel) { - return ExecuteVerb(service, request) + return ExecuteVerb(service, request, std::move(logger), logLevel) .Get() .ValueOrThrow(); } diff --git a/yt/yt/core/ytree/ypath_client.cpp b/yt/yt/core/ytree/ypath_client.cpp index fc0671c399..dbeae07065 100644 --- a/yt/yt/core/ytree/ypath_client.cpp +++ b/yt/yt/core/ytree/ypath_client.cpp @@ -331,12 +331,17 @@ void ResolveYPath( TFuture<TSharedRefArray> ExecuteVerb( const IYPathServicePtr& service, - const TSharedRefArray& requestMessage) + const TSharedRefArray& requestMessage, + NLogging::TLogger logger, + NLogging::ELogLevel logLevel) { IYPathServicePtr suffixService; TYPath suffixPath; try { - auto resolveContext = CreateYPathContext(requestMessage); + auto resolveContext = CreateYPathContext( + requestMessage, + logger, + logLevel); ResolveYPath( service, resolveContext, @@ -352,7 +357,10 @@ TFuture<TSharedRefArray> ExecuteVerb( auto updatedRequestMessage = SetRequestHeader(requestMessage, requestHeader); - auto invokeContext = CreateYPathContext(std::move(updatedRequestMessage)); + auto invokeContext = CreateYPathContext( + std::move(updatedRequestMessage), + std::move(logger), + logLevel); // NB: Calling GetAsyncResponseMessage after Invoke is not allowed. auto asyncResponseMessage = invokeContext->GetAsyncResponseMessage(); diff --git a/yt/yt/core/ytree/ypath_client.h b/yt/yt/core/ytree/ypath_client.h index c01a469402..7169fbc0d7 100644 --- a/yt/yt/core/ytree/ypath_client.h +++ b/yt/yt/core/ytree/ypath_client.h @@ -221,7 +221,9 @@ void ResolveYPath( TFuture<TSharedRefArray> ExecuteVerb( const IYPathServicePtr& service, - const TSharedRefArray& requestMessage); + const TSharedRefArray& requestMessage, + NLogging::TLogger logger = {}, + NLogging::ELogLevel logLevel = NLogging::ELogLevel::Debug); //! Asynchronously executes a request against a given service. void ExecuteVerb( @@ -233,7 +235,9 @@ template <class TTypedRequest> TFuture<TIntrusivePtr<typename TTypedRequest::TTypedResponse>> ExecuteVerb( const IYPathServicePtr& service, - const TIntrusivePtr<TTypedRequest>& request); + const TIntrusivePtr<TTypedRequest>& request, + NLogging::TLogger logger = {}, + NLogging::ELogLevel logLevel = NLogging::ELogLevel::Debug); //! Synchronously executes a typed YPath request against a given service. //! Throws if an error has occurred. @@ -241,7 +245,9 @@ template <class TTypedRequest> TIntrusivePtr<typename TTypedRequest::TTypedResponse> SyncExecuteVerb( const IYPathServicePtr& service, - const TIntrusivePtr<TTypedRequest>& request); + const TIntrusivePtr<TTypedRequest>& request, + NLogging::TLogger logger = {}, + NLogging::ELogLevel logLevel = NLogging::ELogLevel::Debug); //! Executes |GetKey| verb assuming #service handles requests synchronously. Throws if an error has occurred. TString SyncYPathGetKey( |