diff options
author | kvk1920 <kvk1920@yandex-team.com> | 2023-09-14 22:32:54 +0300 |
---|---|---|
committer | kvk1920 <kvk1920@yandex-team.com> | 2023-09-14 22:50:46 +0300 |
commit | 09cfb2c95783f076ce68a8995125d73fbffcf0d9 (patch) | |
tree | d578ac7caecf6ed3b9ae3c54bb8f6cd1f3969dc4 /yt/yt_proto | |
parent | 179f98b85dbb00b946e8bc3d40dde90e5b9ba8df (diff) | |
download | ydb-09cfb2c95783f076ce68a8995125d73fbffcf0d9.tar.gz |
Per-request complexity limits
Diffstat (limited to 'yt/yt_proto')
-rw-r--r-- | yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto | 3 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/CMakeLists.darwin-x86_64.txt | 13 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/CMakeLists.linux-aarch64.txt | 13 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/CMakeLists.linux-x86_64.txt | 13 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/CMakeLists.windows-x86_64.txt | 13 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/ya.make | 1 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto | 13 | ||||
-rw-r--r-- | yt/yt_proto/yt/core/ytree/proto/ypath.proto | 4 |
8 files changed, 73 insertions, 0 deletions
diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto index 4892210e1a..430f00cea1 100644 --- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto +++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto @@ -9,6 +9,7 @@ option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/api/rpc_prox import "yt_proto/yt/core/misc/proto/guid.proto"; import "yt_proto/yt/core/misc/proto/error.proto"; import "yt_proto/yt/core/ytree/proto/attributes.proto"; +import "yt_proto/yt/core/ytree/proto/request_complexity_limits.proto"; import "yt_proto/yt/client/hive/proto/timestamp_map.proto"; import "yt_proto/yt/client/chunk_client/proto/data_statistics.proto"; import "yt_proto/yt/client/chaos_client/proto/replication_card.proto"; @@ -1152,6 +1153,7 @@ message TReqGetNode optional NYT.NYTree.NProto.TAttributeFilter attributes = 4; optional int64 max_size = 3; + optional NYT.NYTree.NProto.TReadRequestComplexityLimits complexity_limits = 6; optional TTransactionalOptions transactional_options = 100; optional TPrerequisiteOptions prerequisite_options = 101; @@ -1179,6 +1181,7 @@ message TReqListNode optional NYT.NYTree.NProto.TAttributeFilter attributes = 4; optional int64 max_size = 3; + optional NYT.NYTree.NProto.TReadRequestComplexityLimits complexity_limits = 6; optional TTransactionalOptions transactional_options = 100; optional TPrerequisiteOptions prerequisite_options = 101; diff --git a/yt/yt_proto/yt/core/CMakeLists.darwin-x86_64.txt b/yt/yt_proto/yt/core/CMakeLists.darwin-x86_64.txt index f131b5c4e9..14da9a86fa 100644 --- a/yt/yt_proto/yt/core/CMakeLists.darwin-x86_64.txt +++ b/yt/yt_proto/yt/core/CMakeLists.darwin-x86_64.txt @@ -150,6 +150,18 @@ get_built_tool_path( contrib/tools/protoc/plugins/cpp_styleguide cpp_styleguide ) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) add_library(yt_proto-yt-core) target_include_directories(yt_proto-yt-core PUBLIC @@ -172,6 +184,7 @@ target_proto_messages(yt_proto-yt-core PRIVATE ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/rpc/proto/rpc.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/attributes.proto + ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/ypath.proto ) target_proto_addincls(yt_proto-yt-core diff --git a/yt/yt_proto/yt/core/CMakeLists.linux-aarch64.txt b/yt/yt_proto/yt/core/CMakeLists.linux-aarch64.txt index 2907cf3959..8d49808dff 100644 --- a/yt/yt_proto/yt/core/CMakeLists.linux-aarch64.txt +++ b/yt/yt_proto/yt/core/CMakeLists.linux-aarch64.txt @@ -150,6 +150,18 @@ get_built_tool_path( contrib/tools/protoc/plugins/cpp_styleguide cpp_styleguide ) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) add_library(yt_proto-yt-core) target_include_directories(yt_proto-yt-core PUBLIC @@ -173,6 +185,7 @@ target_proto_messages(yt_proto-yt-core PRIVATE ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/rpc/proto/rpc.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/attributes.proto + ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/ypath.proto ) target_proto_addincls(yt_proto-yt-core diff --git a/yt/yt_proto/yt/core/CMakeLists.linux-x86_64.txt b/yt/yt_proto/yt/core/CMakeLists.linux-x86_64.txt index 2907cf3959..8d49808dff 100644 --- a/yt/yt_proto/yt/core/CMakeLists.linux-x86_64.txt +++ b/yt/yt_proto/yt/core/CMakeLists.linux-x86_64.txt @@ -150,6 +150,18 @@ get_built_tool_path( contrib/tools/protoc/plugins/cpp_styleguide cpp_styleguide ) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) add_library(yt_proto-yt-core) target_include_directories(yt_proto-yt-core PUBLIC @@ -173,6 +185,7 @@ target_proto_messages(yt_proto-yt-core PRIVATE ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/rpc/proto/rpc.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/attributes.proto + ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/ypath.proto ) target_proto_addincls(yt_proto-yt-core diff --git a/yt/yt_proto/yt/core/CMakeLists.windows-x86_64.txt b/yt/yt_proto/yt/core/CMakeLists.windows-x86_64.txt index f131b5c4e9..14da9a86fa 100644 --- a/yt/yt_proto/yt/core/CMakeLists.windows-x86_64.txt +++ b/yt/yt_proto/yt/core/CMakeLists.windows-x86_64.txt @@ -150,6 +150,18 @@ get_built_tool_path( contrib/tools/protoc/plugins/cpp_styleguide cpp_styleguide ) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) add_library(yt_proto-yt-core) target_include_directories(yt_proto-yt-core PUBLIC @@ -172,6 +184,7 @@ target_proto_messages(yt_proto-yt-core PRIVATE ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/rpc/proto/rpc.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/attributes.proto + ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto ${CMAKE_SOURCE_DIR}/yt/yt_proto/yt/core/ytree/proto/ypath.proto ) target_proto_addincls(yt_proto-yt-core diff --git a/yt/yt_proto/yt/core/ya.make b/yt/yt_proto/yt/core/ya.make index 01de274fe4..cc684cf8c9 100644 --- a/yt/yt_proto/yt/core/ya.make +++ b/yt/yt_proto/yt/core/ya.make @@ -20,6 +20,7 @@ SRCS( yson/proto/protobuf_interop.proto ytree/proto/attributes.proto + ytree/proto/request_complexity_limits.proto ytree/proto/ypath.proto ) diff --git a/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto b/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto new file mode 100644 index 0000000000..db37024a09 --- /dev/null +++ b/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto @@ -0,0 +1,13 @@ +package NYT.NYTree.NProto; + +option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; + +//////////////////////////////////////////////////////////////////////////////// + +message TReadRequestComplexityLimits +{ + optional int64 node_count = 1; + optional int64 result_size = 2; +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/ytree/proto/ypath.proto b/yt/yt_proto/yt/core/ytree/proto/ypath.proto index 20e1192ec7..983adc82e0 100644 --- a/yt/yt_proto/yt/core/ytree/proto/ypath.proto +++ b/yt/yt_proto/yt/core/ytree/proto/ypath.proto @@ -2,6 +2,7 @@ package NYT.NYTree.NProto; import "yt_proto/yt/core/rpc/proto/rpc.proto"; import "yt_proto/yt/core/ytree/proto/attributes.proto"; +import "yt_proto/yt/core/ytree/proto/request_complexity_limits.proto"; option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; @@ -30,6 +31,9 @@ message TYPathHeaderExt //! A copy of additional_paths in case of path rewrite. repeated string original_additional_paths = 5; + optional TReadRequestComplexityLimits read_complexity_limits = 7; + + // COMPAT(kvk1920): Unreserve `6` after 23.2. reserved 6; } |