diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-01 19:29:41 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-01 19:50:37 +0300 |
commit | 0958dbb9b614bd9256e4d6f772fb94c3af3d74b0 (patch) | |
tree | bf9a0ab651a87e91d87d97df10f9d404ba91bfa3 | |
parent | 15976c337420c1e7bbd8ee6a7955735f71781387 (diff) | |
download | ydb-0958dbb9b614bd9256e4d6f772fb94c3af3d74b0.tar.gz |
Intermediate changes
commit_hash:dc07e4388dadb503fe10a3abb0242cd2ae85c646
7 files changed, 12 insertions, 35 deletions
diff --git a/contrib/libs/grpc/.yandex_meta/__init__.py b/contrib/libs/grpc/.yandex_meta/__init__.py index 10b90b7f8c..50ce8e2a7d 100644 --- a/contrib/libs/grpc/.yandex_meta/__init__.py +++ b/contrib/libs/grpc/.yandex_meta/__init__.py @@ -47,7 +47,6 @@ def post_install(self): # in the name of selective checkout # https://st.yandex-team.ru/DTCC-615 def fix_selective_checkout(): - self.yamakes["."].PEERDIR.remove("contrib/restricted/abseil-cpp-tstring") self.yamakes["."].PEERDIR |= { "contrib/restricted/abseil-cpp-tstring/y_absl/algorithm", "contrib/restricted/abseil-cpp-tstring/y_absl/functional", @@ -91,13 +90,11 @@ def post_install(self): # fix path for protos with self.yamakes["grpc++_reflection"] as m: - m.PEERDIR.remove("contrib/restricted/abseil-cpp-tstring") m.PEERDIR.remove("contrib/libs/grpc/src/protos/src/proto/grpc/reflection/v1alpha") m.PEERDIR.add("contrib/libs/grpc/src/proto/grpc/reflection/v1alpha") m.ADDINCL.remove("contrib/libs/grpc/protos") with self.yamakes["grpcpp_channelz"] as m: - m.PEERDIR.remove("contrib/restricted/abseil-cpp-tstring") m.PEERDIR.remove("contrib/libs/grpc/src/protos/src/proto/grpc/channelz") m.PEERDIR.add("contrib/libs/grpc/src/proto/grpc/channelz") m.ADDINCL.remove("contrib/libs/grpc/protos") diff --git a/contrib/libs/grpc/patches/02-protobuf-1.patch b/contrib/libs/grpc/patches/02-protobuf-1.patch index d011608754..d9d5f23d91 100644 --- a/contrib/libs/grpc/patches/02-protobuf-1.patch +++ b/contrib/libs/grpc/patches/02-protobuf-1.patch @@ -2,24 +2,6 @@ diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_r index f26f007..ceca602 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc -@@ -94,7 +94,7 @@ Status ProtoServerReflection::ServerReflectionInfo( - void ProtoServerReflection::FillErrorResponse(const Status& status, - ErrorResponse* error_response) { - error_response->set_error_code(status.error_code()); -- error_response->set_error_message(status.error_message()); -+ error_response->set_error_message(TProtoStringType(status.error_message())); - } - - Status ProtoServerReflection::ListService(ServerContext* /*context*/, -@@ -104,7 +104,7 @@ Status ProtoServerReflection::ListService(ServerContext* /*context*/, - } - for (const auto& value : *services_) { - ServiceResponse* service_response = response->add_service(); -- service_response->set_name(value); -+ service_response->set_name(TProtoStringType(value)); - } - return Status::OK; - } @@ -116,7 +116,7 @@ Status ProtoServerReflection::GetFileByName( } @@ -47,15 +29,6 @@ index f26f007..ceca602 100644 if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } -@@ -185,7 +185,7 @@ Status ProtoServerReflection::GetAllExtensionNumbers( - for (const auto& value : extensions) { - response->add_extension_number(value->number()); - } -- response->set_base_type_name(type); -+ response->set_base_type_name(TProtoStringType(type)); - return Status::OK; - } - @@ -199,7 +199,7 @@ void ProtoServerReflection::FillFileDescriptorResponse( seen_files->insert(file_desc->name()); diff --git a/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc b/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc index 0e008fcb6b..3dac0b4643 100644 --- a/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc +++ b/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc @@ -94,7 +94,7 @@ Status ProtoServerReflection::ServerReflectionInfo( void ProtoServerReflection::FillErrorResponse(const Status& status, ErrorResponse* error_response) { error_response->set_error_code(status.error_code()); - error_response->set_error_message(TProtoStringType(status.error_message())); + error_response->set_error_message(status.error_message()); } Status ProtoServerReflection::ListService(ServerContext* /*context*/, @@ -104,7 +104,7 @@ Status ProtoServerReflection::ListService(ServerContext* /*context*/, } for (const auto& value : *services_) { ServiceResponse* service_response = response->add_service(); - service_response->set_name(TProtoStringType(value)); + service_response->set_name(value); } return Status::OK; } @@ -185,7 +185,7 @@ Status ProtoServerReflection::GetAllExtensionNumbers( for (const auto& value : extensions) { response->add_extension_number(value->number()); } - response->set_base_type_name(TProtoStringType(type)); + response->set_base_type_name(type); return Status::OK; } diff --git a/yt/yt/library/profiling/sensors_owner/README.md b/yt/yt/library/profiling/sensors_owner/README.md index 66aa91bd42..f6602e8ba0 100644 --- a/yt/yt/library/profiling/sensors_owner/README.md +++ b/yt/yt/library/profiling/sensors_owner/README.md @@ -8,7 +8,7 @@ TSensorsOwner может владеть другими TSensorsOwner. Имеет * Простейший пример использования: ```cpp -sensorsOwner.Inc("/my_simple_counter", 1); +sensorsOwner.Increment("/my_simple_counter", 1); ``` Когда в конкретном месте нужно проинкрементить всего один счетчик. Объект счетчика в этом случае создатся один раз и будет храниться внутри sensorsOwner. diff --git a/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp b/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp index b91cfcdeb1..eade45613e 100644 --- a/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp +++ b/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp @@ -175,11 +175,16 @@ const TRateHistogram& TSensorsOwner::GetRateHistogram(const std::string& name, s return Get<TRateHistogramWrapper<std::vector<double>>>(name, std::move(buckets)).Sensor; } -void TSensorsOwner::Inc(const std::string& name, i64 delta) const +void TSensorsOwner::Increment(const std::string& name, i64 delta) const { GetCounter(name).Increment(delta); } +void TSensorsOwner::Inc(const std::string& name, i64 delta) const +{ + Increment(name, delta); +} + TIntrusivePtr<TSensorsOwner::TState> TSensorsOwner::GetDefaultState() { static auto state = New<TState>(TProfiler()); diff --git a/yt/yt/library/profiling/sensors_owner/sensors_owner.h b/yt/yt/library/profiling/sensors_owner/sensors_owner.h index b3fa6dd1d5..c4b0376708 100644 --- a/yt/yt/library/profiling/sensors_owner/sensors_owner.h +++ b/yt/yt/library/profiling/sensors_owner/sensors_owner.h @@ -77,6 +77,7 @@ public: const TCounter& GetCounter(const std::string& name) const; //! ~ .Counter(str).Increment(delta) + void Increment(const std::string& name, i64 delta) const; void Inc(const std::string& name, i64 delta) const; //! Gets owned gauge with given metric suffix. diff --git a/yt/yt/library/profiling/sensors_owner/unittests/sensors_owner_ut.cpp b/yt/yt/library/profiling/sensors_owner/unittests/sensors_owner_ut.cpp index 0a8ffe4c3e..d4239e012e 100644 --- a/yt/yt/library/profiling/sensors_owner/unittests/sensors_owner_ut.cpp +++ b/yt/yt/library/profiling/sensors_owner/unittests/sensors_owner_ut.cpp @@ -52,6 +52,7 @@ TEST(TSensorsOwnerTest, Example) using TSharedSensorsPtr = NYT::TIntrusivePtr<TSharedSensors>; owner.Inc(".my_simple_counter", 1); + owner.Increment(".my_simple_counter", 1); owner.Get<TSensors>().OtherSensors.Get<TChildSensors>().Counter.Increment(1); owner.Get<TSharedSensorsPtr>()->Counter.Increment(1); owner.Get<TAnotherSensors>(42).Counter.Increment(1); |