diff options
author | monster <monster@yandex-team.ru> | 2022-02-10 16:47:19 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:19 +0300 |
commit | b23c1d7a8015c2006a148fd93b84cdeb0aee17a3 (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/grpc/server | |
parent | dd76ae1f6213d065375ab296699f764faafbe5bd (diff) | |
download | ydb-b23c1d7a8015c2006a148fd93b84cdeb0aee17a3.tar.gz |
Restoring authorship annotation for <monster@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/grpc/server')
-rw-r--r-- | library/cpp/grpc/server/grpc_counters.h | 18 | ||||
-rw-r--r-- | library/cpp/grpc/server/grpc_request.h | 8 | ||||
-rw-r--r-- | library/cpp/grpc/server/grpc_request_base.h | 6 | ||||
-rw-r--r-- | library/cpp/grpc/server/grpc_server.cpp | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/grpc/server/grpc_counters.h b/library/cpp/grpc/server/grpc_counters.h index 29600c7d96..0b6c36c84c 100644 --- a/library/cpp/grpc/server/grpc_counters.h +++ b/library/cpp/grpc/server/grpc_counters.h @@ -18,13 +18,13 @@ struct ICounterBlock : public TThrRefBase { virtual void CountRequestsWithoutDatabase() {} virtual void CountRequestsWithoutToken() {} virtual void CountRequestWithoutTls() {} - - virtual TIntrusivePtr<ICounterBlock> Clone() { return this; } - virtual void UseDatabase(const TString& database) { Y_UNUSED(database); } + + virtual TIntrusivePtr<ICounterBlock> Clone() { return this; } + virtual void UseDatabase(const TString& database) { Y_UNUSED(database); } }; -using ICounterBlockPtr = TIntrusivePtr<ICounterBlock>; - +using ICounterBlockPtr = TIntrusivePtr<ICounterBlock>; + class TCounterBlock final : public ICounterBlock { NMonitoring::TDynamicCounters::TCounterPtr TotalCounter; NMonitoring::TDynamicCounters::TCounterPtr InflyCounter; @@ -113,10 +113,10 @@ public: } } - ICounterBlockPtr Clone() override { - return this; - } - + ICounterBlockPtr Clone() override { + return this; + } + void Update() { if (Percentile) { RequestHistMs.Update(); diff --git a/library/cpp/grpc/server/grpc_request.h b/library/cpp/grpc/server/grpc_request.h index aeb8d31f29..5bd8d3902b 100644 --- a/library/cpp/grpc/server/grpc_request.h +++ b/library/cpp/grpc/server/grpc_request.h @@ -224,10 +224,10 @@ public: return &Arena_; } - void UseDatabase(const TString& database) override { - Counters_->UseDatabase(database); - } - + void UseDatabase(const TString& database) override { + Counters_->UseDatabase(database); + } + private: void Clone() { if (!Server_->IsShuttingDown()) { diff --git a/library/cpp/grpc/server/grpc_request_base.h b/library/cpp/grpc/server/grpc_request_base.h index c6d64ed648..fcfce1c181 100644 --- a/library/cpp/grpc/server/grpc_request_base.h +++ b/library/cpp/grpc/server/grpc_request_base.h @@ -90,9 +90,9 @@ public: //! The metadata will be send at the time of rpc finish virtual void AddTrailingMetadata(const TString& key, const TString& value) = 0; - //! Use validated database name for counters - virtual void UseDatabase(const TString& database) = 0; - + //! Use validated database name for counters + virtual void UseDatabase(const TString& database) = 0; + // Streaming part //! Set callback. The callback will be called when response deliverid to the client diff --git a/library/cpp/grpc/server/grpc_server.cpp b/library/cpp/grpc/server/grpc_server.cpp index 579ee24f06..7437b7a8f5 100644 --- a/library/cpp/grpc/server/grpc_server.cpp +++ b/library/cpp/grpc/server/grpc_server.cpp @@ -147,7 +147,7 @@ void TGRpcServer::Start() { Server_ = builder.BuildAndStart(); if (!Server_) { - ythrow yexception() << "can't start grpc server on " << server_address; + ythrow yexception() << "can't start grpc server on " << server_address; } size_t index = 0; |