From 6ddc1f8a2f81b6455b7941944a302561ff9416be Mon Sep 17 00:00:00 2001 From: Bulat Gayazov Date: Thu, 22 Aug 2024 17:55:00 +0000 Subject: [PATCH] Update proto files --- .../client/datastreams/datastreams.h | 2 +- .../ydb-cpp-sdk/client/draft/ydb_scripting.h | 2 +- .../client/federated_topic/federated_topic.h | 2 +- include/ydb-cpp-sdk/client/proto/accessor.h | 16 +- .../ydb-cpp-sdk/client/topic/control_plane.h | 2 +- src/api/grpc/draft/ydb_backup_v1.proto | 33 ++++ .../grpc/draft/ydb_object_storage_v1.proto | 10 + src/api/grpc/draft/ydb_tablet_v1.proto | 34 ++++ src/api/grpc/draft/ydb_ymq_v1.proto | 2 + src/api/grpc/ydb_query_v1.proto | 5 - src/api/grpc/ydb_topic_v1.proto | 12 +- src/api/protos/annotations/ya.make | 10 + src/api/protos/draft/datastreams.proto | 58 +++++- src/api/protos/draft/fq.proto | 28 ++- src/api/protos/draft/persqueue_common.proto | 7 +- .../protos/draft/persqueue_error_codes.proto | 1 + src/api/protos/draft/ydb_backup.proto | 179 ++++++++++++++++++ src/api/protos/draft/ydb_maintenance.proto | 11 +- src/api/protos/draft/ydb_object_storage.proto | 36 ++++ src/api/protos/draft/ydb_replication.proto | 14 ++ src/api/protos/draft/ydb_tablet.proto | 62 ++++++ src/api/protos/persqueue_error_codes_v1.proto | 4 +- src/api/protos/ydb_cms.proto | 8 + src/api/protos/ydb_formats.proto | 7 + src/api/protos/ydb_issue_message.proto | 4 +- src/api/protos/ydb_monitoring.proto | 3 + src/api/protos/ydb_operation.proto | 12 +- src/api/protos/ydb_persqueue_v1.proto | 71 +++---- src/api/protos/ydb_query.proto | 4 + src/api/protos/ydb_scheme.proto | 1 + src/api/protos/ydb_table.proto | 85 +++++++++ src/api/protos/ydb_topic.proto | 168 +++++++++------- src/client/coordination/coordination.cpp | 2 +- src/client/draft/ydb_dynamic_config.cpp | 2 +- src/client/draft/ydb_replication.cpp | 2 +- src/client/draft/ydb_scripting.cpp | 4 +- src/client/export/export.cpp | 6 +- .../impl/federated_topic_impl.h | 2 +- .../impl/federation_observer.cpp | 2 +- .../impl/federation_observer.h | 2 +- src/client/iam/common/iam.cpp | 4 +- src/client/iam_private/iam.cpp | 4 +- .../db_driver_state/endpoint_pool.h | 2 +- .../ydb_internal/grpc_connections/actions.cpp | 2 +- .../ydb_internal/grpc_connections/actions.h | 2 +- .../grpc_connections/grpc_connections.h | 2 +- .../impl/ydb_internal/make_request/make.h | 2 +- .../impl/ydb_internal/plain_status/status.h | 2 +- .../impl/ydb_internal/table_helpers/helpers.h | 2 +- .../impl/ydb_internal/value_helpers/helpers.h | 2 +- src/client/import/import.cpp | 6 +- src/client/monitoring/monitoring.cpp | 4 +- src/client/operation/operation.cpp | 2 +- src/client/params/impl.cpp | 4 +- src/client/params/params.cpp | 2 +- .../persqueue_public/impl/persqueue_impl.h | 2 +- .../persqueue_public/include/control_plane.h | 2 +- src/client/query/client.cpp | 2 +- src/client/query/impl/client_session.h | 2 +- src/client/query/impl/exec_query.cpp | 2 +- src/client/query/query.cpp | 2 +- src/client/query/stats.cpp | 2 +- src/client/rate_limiter/rate_limiter.cpp | 2 +- src/client/result/result.cpp | 4 +- src/client/scheme/scheme.cpp | 4 +- src/client/ss_tasks/task.cpp | 6 +- src/client/table/impl/client_session.h | 2 +- src/client/table/impl/data_query.h | 2 +- src/client/table/impl/readers.h | 2 +- src/client/table/impl/table_client.h | 2 +- src/client/table/table.cpp | 4 +- src/client/topic/impl/read_session_impl.h | 4 +- src/client/topic/impl/topic_impl.h | 2 +- src/client/topic/impl/write_session_impl.cpp | 2 +- src/client/topic/ut/describe_topic_ut.cpp | 2 +- src/client/types/credentials/login/login.cpp | 2 +- src/client/types/operation/operation.cpp | 2 +- src/client/value/value.cpp | 2 +- src/library/proto_output/proto_output.cpp | 4 +- .../yql_common/issue/yql_issue_message.cpp | 2 +- .../client/coordination/coordination_ut.cpp | 4 +- .../discovery_mutator_ut.cpp | 2 +- tests/unit/client/driver/driver_ut.cpp | 4 +- tests/unit/client/result/result_ut.cpp | 2 +- .../ydb_scripting_response_headers_ut.cpp | 4 +- tests/unit/client/value/value_ut.cpp | 2 +- .../library/yql_common/issue/yql_issue_ut.cpp | 2 +- 87 files changed, 832 insertions(+), 209 deletions(-) create mode 100644 src/api/grpc/draft/ydb_backup_v1.proto create mode 100644 src/api/grpc/draft/ydb_object_storage_v1.proto create mode 100644 src/api/grpc/draft/ydb_tablet_v1.proto create mode 100644 src/api/protos/annotations/ya.make create mode 100644 src/api/protos/draft/ydb_backup.proto create mode 100644 src/api/protos/draft/ydb_object_storage.proto create mode 100644 src/api/protos/draft/ydb_tablet.proto diff --git a/include/ydb-cpp-sdk/client/datastreams/datastreams.h b/include/ydb-cpp-sdk/client/datastreams/datastreams.h index 65cbb56e3dc..15ead26b0c1 100644 --- a/include/ydb-cpp-sdk/client/datastreams/datastreams.h +++ b/include/ydb-cpp-sdk/client/datastreams/datastreams.h @@ -2,7 +2,7 @@ #include -#include +#include namespace NYdb::NDataStreams::V1 { diff --git a/include/ydb-cpp-sdk/client/draft/ydb_scripting.h b/include/ydb-cpp-sdk/client/draft/ydb_scripting.h index 58cc92d1b51..a921a296185 100644 --- a/include/ydb-cpp-sdk/client/draft/ydb_scripting.h +++ b/include/ydb-cpp-sdk/client/draft/ydb_scripting.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include namespace NYdb { namespace NScripting { diff --git a/include/ydb-cpp-sdk/client/federated_topic/federated_topic.h b/include/ydb-cpp-sdk/client/federated_topic/federated_topic.h index 30b98b0c806..f952fd6c541 100644 --- a/include/ydb-cpp-sdk/client/federated_topic/federated_topic.h +++ b/include/ydb-cpp-sdk/client/federated_topic/federated_topic.h @@ -2,7 +2,7 @@ #include -#include +#include #include diff --git a/include/ydb-cpp-sdk/client/proto/accessor.h b/include/ydb-cpp-sdk/client/proto/accessor.h index f476b91de80..4569764ad9a 100644 --- a/include/ydb-cpp-sdk/client/proto/accessor.h +++ b/include/ydb-cpp-sdk/client/proto/accessor.h @@ -1,13 +1,13 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/include/ydb-cpp-sdk/client/topic/control_plane.h b/include/ydb-cpp-sdk/client/topic/control_plane.h index 5d1f8feddae..3369f8c9840 100644 --- a/include/ydb-cpp-sdk/client/topic/control_plane.h +++ b/include/ydb-cpp-sdk/client/topic/control_plane.h @@ -4,7 +4,7 @@ #include -#include +#include #include diff --git a/src/api/grpc/draft/ydb_backup_v1.proto b/src/api/grpc/draft/ydb_backup_v1.proto new file mode 100644 index 00000000000..259abcceca3 --- /dev/null +++ b/src/api/grpc/draft/ydb_backup_v1.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +option cc_enable_arenas = true; + +package Ydb.Backup.V1; + +option java_package = "com.yandex.ydb.backup.v1"; + +import "src/api/protos/draft/ydb_backup.proto"; + +service BackupService { + // Fetches data from remote storage to cluster instance + // After successful completion of this call BackupCollection objects are created inside cluster + // And remote data can be accessed through them + rpc FetchBackupCollections(FetchBackupCollectionsRequest) returns (FetchBackupCollectionsResponse) {} + + // Shows BackupCollection's present in cluster (probably with some filters or accessible by current user) + // Exact storage scheme of this collections will be defined later (probably at the beginning it will be some flat scheme by UUID with indices for filtering) + rpc ListBackupCollections(ListBackupCollectionsRequest) returns (ListBackupCollectionsResponse) {} + + // Creates backup collection with specified settings + // In case of remote backup collection (e.g. stored in s3) also checks connection to s3 and all corresponding rights + rpc CreateBackupCollection(CreateBackupCollectionRequest) returns (CreateBackupCollectionResponse) {} + + // Returns specified BackupCollection data + rpc ReadBackupCollection(ReadBackupCollectionRequest) returns (ReadBackupCollectionResponse) {} + + // Somehow updates BackupCollection state. Maybe all subobjects will be modified through this call, maybe they will have separate calls + rpc UpdateBackupCollection(UpdateBackupCollectionRequest) returns (UpdateBackupCollectionResponse) {} + + // Deletes BackupCollection. In case of remote backup collection data WILL be preserved if other is not specified explicitly + // In case of read-only BackupCollection's additionally to this explicit flag user should set force flag. + rpc DeleteBackupCollection(DeleteBackupCollectionRequest) returns (DeleteBackupCollectionResponse) {} +} diff --git a/src/api/grpc/draft/ydb_object_storage_v1.proto b/src/api/grpc/draft/ydb_object_storage_v1.proto new file mode 100644 index 00000000000..47def2efe54 --- /dev/null +++ b/src/api/grpc/draft/ydb_object_storage_v1.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package Ydb.ObjectStorage.V1; +option java_package = "com.yandex.ydb.object_storage.v1"; + +import "src/api/protos/draft/ydb_object_storage.proto"; + +service ObjectStorageService { + rpc List(ObjectStorage.ListingRequest) returns (ObjectStorage.ListingResponse); +} diff --git a/src/api/grpc/draft/ydb_tablet_v1.proto b/src/api/grpc/draft/ydb_tablet_v1.proto new file mode 100644 index 00000000000..c06577b0958 --- /dev/null +++ b/src/api/grpc/draft/ydb_tablet_v1.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package Ydb.Tablet.V1; +option java_package = "com.yandex.ydb.tablet.v1"; + +import "src/api/protos/draft/ydb_tablet.proto"; + +// This service has low-level APIs that are not intended for normal operation, +// sometimes allowing system administrators to repair broken databases or +// perform reconfiguration that is not directly supported. These may break the +// system completely however, so use with caution and make sure you really know +// what you're doing. +service TabletService { + + // Execute a minikql script at the specified tablet. + // This may be used to side-step intended tablet APIs and work with their + // local database directly, e.g. to repair tablets in an unexpected state. + // Note the modified tablet usually needs to be restarted to pick up any + // changes, since its logical in-memory state is not updated and diverges + // from the new persistent state. + rpc ExecuteTabletMiniKQL(ExecuteTabletMiniKQLRequest) returns (ExecuteTabletMiniKQLResponse); + + // Change schema of the specified tablet and get the resulting schema. + // This may be used to side-step intended tablet APIs and repair tablets + // in an unexpected state. Empty changes are useful to dump current tablet + // schema. + rpc ChangeTabletSchema(ChangeTabletSchemaRequest) returns (ChangeTabletSchemaResponse); + + // Restart the specified tablet. + // This may help when tablets (or their clients) are running in an + // unexpected state, sometimes allowing them to get unstuck. + rpc RestartTablet(RestartTabletRequest) returns (RestartTabletResponse); + +} diff --git a/src/api/grpc/draft/ydb_ymq_v1.proto b/src/api/grpc/draft/ydb_ymq_v1.proto index 2d67a2b6462..6e00aa2b726 100644 --- a/src/api/grpc/draft/ydb_ymq_v1.proto +++ b/src/api/grpc/draft/ydb_ymq_v1.proto @@ -5,8 +5,10 @@ package Ydb.Ymq.V1; import "src/api/protos/draft/ymq.proto"; + option java_package = "com.yandex.ydb.ymq.v1"; + service YmqService { rpc GetQueueUrl(GetQueueUrlRequest) returns (GetQueueUrlResponse); rpc CreateQueue(CreateQueueRequest) returns (CreateQueueResponse); diff --git a/src/api/grpc/ydb_query_v1.proto b/src/api/grpc/ydb_query_v1.proto index a7f1168789e..149b9fd49e4 100644 --- a/src/api/grpc/ydb_query_v1.proto +++ b/src/api/grpc/ydb_query_v1.proto @@ -6,11 +6,6 @@ option java_package = "com.yandex.ydb.query.v1"; import "src/api/protos/ydb_operation.proto"; import "src/api/protos/ydb_query.proto"; -// ! WARNING: Experimental API -// ! This API is currently in experimental state and is a subject for changes. -// ! No backward and/or forward compatibility guarantees are provided. -// ! DO NOT USE for production workloads. - service QueryService { // Sessions are basic primitives for communicating with YDB Query Service. The are similar to // connections for classic relational DBs. Sessions serve three main purposes: diff --git a/src/api/grpc/ydb_topic_v1.proto b/src/api/grpc/ydb_topic_v1.proto index 0ee41592ae8..8480125ac1b 100644 --- a/src/api/grpc/ydb_topic_v1.proto +++ b/src/api/grpc/ydb_topic_v1.proto @@ -96,15 +96,19 @@ service TopicService { // Create DirectRead Session // Pipeline: // client server - // StartDirectReadPartitionSession(SessionID1, PartitionSessionID1, TabletGeneration1, Secret1,...) + // InitRequest(SessionID1, TopicReadSettings, Consumer) // ----------------> + // InitResponse + // <---------------- + // StartDirectReadPartitionSessionRequest(PartitionSessionID1, LastDirectReadID, TabletGeneration1) + // ----------------> + // StartDirectReadPartitionSessionResponse(PartitionSessionID1, TabletGeneration1) + // <---------------- // DirectReadResponse(PartitionSessionID1, DirectReadID1, Secret1, ...) // <---------------- // DirectReadResponse(PartitionSessionID1, DirectReadID2, Secret1, ...) // <---------------- - // UpdateDirectReadPartitionSession(SessionID1, PartitionSessionID1, TabletGeneration1, Secret1,...) - // ----------------> - // StopDirectReadPartitionSession(SessionID1, PartitionSessionID1, TabletGeneration1, Secret1,...) + // StopDirectReadPartitionSession(status, issues, PartitionSessionID1, TabletGeneration1) // <---------------- rpc StreamDirectRead(stream StreamDirectReadMessage.FromClient) returns (stream StreamDirectReadMessage.FromServer); diff --git a/src/api/protos/annotations/ya.make b/src/api/protos/annotations/ya.make new file mode 100644 index 00000000000..7cf7d764e19 --- /dev/null +++ b/src/api/protos/annotations/ya.make @@ -0,0 +1,10 @@ +PROTO_LIBRARY() + +SRCS( + sensitive.proto + validation.proto +) + +EXCLUDE_TAGS(GO_PROTO) + +END() diff --git a/src/api/protos/draft/datastreams.proto b/src/api/protos/draft/datastreams.proto index d047efc43f3..bfe1254fc95 100644 --- a/src/api/protos/draft/datastreams.proto +++ b/src/api/protos/draft/datastreams.proto @@ -5,6 +5,7 @@ import "src/api/protos/ydb_operation.proto"; import "src/api/protos/draft/field_transformation.proto"; import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; package Ydb.DataStreams.V1; option java_package = "com.yandex.ydb.datastreams.v1"; @@ -110,6 +111,8 @@ message StreamDescription { // stream metering mode StreamModeDetails stream_mode_details = 14; + + PartitioningSettings partitioning_settings = 15; } // Represents range of possible sequence numbers for the shard @@ -264,6 +267,55 @@ message StreamModeDetails { StreamMode stream_mode = 1; } +enum AutoPartitioningStrategy { + // The auto partitioning algorithm is not specified. The default value will be used. + AUTO_PARTITIONING_STRATEGY_UNSPECIFIED = 0; + // The auto partitioning is disabled. + AUTO_PARTITIONING_STRATEGY_DISABLED = 1; + // The auto partitioning algorithm will increase partitions count depending on the load characteristics. + // The auto partitioning algorithm will never decrease the number of partitions. + AUTO_PARTITIONING_STRATEGY_SCALE_UP = 2; + // The auto partitioning algorithm will both increase and decrease partitions count depending on the load characteristics. + AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN = 3; + // The auto partitioning is paused. + AUTO_PARTITIONING_STRATEGY_PAUSED = 4; +} + +// Partitioning settings for stream. +message PartitioningSettings { + // Auto merge would stop working when the partitions count reaches min_active_partitions + // Zero value means default - 1. + int64 min_active_partitions = 1; + // Auto split would stop working when the partitions count reaches max_active_partitions + // Zero value means default - 1. + int64 max_active_partitions = 3; + // Settings for the partitions count auto partitioning. + AutoPartitioningSettings auto_partitioning_settings = 4; +} + +message AutoPartitioningSettings { + // Strategy of auto partitioning. + AutoPartitioningStrategy strategy = 1; + // Partition write speed auto partitioning options. + AutoPartitioningWriteSpeedStrategy partition_write_speed = 2; +} + +message AutoPartitioningWriteSpeedStrategy { + //Partition will be auto partitioned up (divided into 2 partitions) + //after write speed to the partition exceeds up_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window + + //Partition will become a candidate to the auto partitioned down + //after write speed doesn’t reach down_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window + //This candidate partition will be auto partitioned down when other neighbour partition will become a candidate to the auto partitioning down and not earlier than a retention period. + + // Zero value means default - 300. + google.protobuf.Duration stabilization_window = 1; + // Zero value means default - 90. + int32 up_utilization_percent = 2; + // Zero value means default - 30. + int32 down_utilization_percent = 3; +} + message CreateStreamRequest { Ydb.Operations.OperationParams operation_params = 1; // Name of the stream @@ -280,6 +332,8 @@ message CreateStreamRequest { } // stream metering mode StreamModeDetails stream_mode_details = 7; + + PartitioningSettings partitioning_settings = 8; } message CreateStreamResponse { @@ -387,6 +441,7 @@ message UpdateStreamRequest { // stream metering mode StreamModeDetails stream_mode_details = 7; + PartitioningSettings partitioning_settings = 8; } message UpdateStreamResponse { @@ -622,7 +677,7 @@ message AddTagsToStreamRequest { // Name of the stream string stream_name = 2; // List of tags to add to stream - repeated string tags = 3; + map tags = 3; } message AddTagsToStreamResponse { @@ -899,4 +954,3 @@ message UpdateStreamModeResponse { message UpdateStreamModeResult { } - diff --git a/src/api/protos/draft/fq.proto b/src/api/protos/draft/fq.proto index 9b1fe8d1ac6..23d17be0a24 100644 --- a/src/api/protos/draft/fq.proto +++ b/src/api/protos/draft/fq.proto @@ -19,7 +19,7 @@ import "google/protobuf/empty.proto"; // === Query API === -// Header: ydb-fq-project => yandexcloud://cloud_id/folder_id +// Header: ydb-fq-project => yandexcloud://folder_id message Acl { enum Visibility { @@ -126,8 +126,10 @@ message QueryContent { // "executor" - type of executor for this query map execution_settings = 10 [(Ydb.map_key).length.range = {min: 1, max: 100}, (Ydb.length).le = 4096]; // Syntax of the text - // By default it is "yql", but additional syntax "pg" (PostreSQL SQL frontend) is supported as well + // By default it is "yql", but additional syntax "pg" (PostgreSQL SQL frontend) is supported as well QuerySyntax syntax = 11; + // Map of query parameters + map parameters = 12 [(Ydb.map_key).length.range = {min: 1, max: 100}]; } message CommonMeta { @@ -372,6 +374,7 @@ message Job { bool automatic = 11; google.protobuf.Timestamp expire_at = 12; QueryContent.QuerySyntax syntax = 13; + map parameters = 14; } // Information about recent query runs @@ -489,6 +492,23 @@ message PostgreSQLCluster { bool secure = 7; } +message GreenplumCluster { + string database_id = 1 [(Ydb.length).le = 1024]; + string database_name = 2 [(Ydb.length).le = 1024]; + string login = 3 [(Ydb.length).le = 1024, (Ydb.sensitive) = true]; + string password = 4 [(Ydb.length).le = 1024, (Ydb.sensitive) = true]; + string schema = 5 [(Ydb.length).le = 1024]; + IamAuth auth = 6; +} + +message MySQLCluster { + string database_id = 1 [(Ydb.length).le = 1024]; + string database_name = 2 [(Ydb.length).le = 1024]; + string login = 3 [(Ydb.length).le = 1024, (Ydb.sensitive) = true]; + string password = 4 [(Ydb.length).le = 1024, (Ydb.sensitive) = true]; + IamAuth auth = 5; +} + message ConnectionSetting { enum ConnectionType { CONNECTION_TYPE_UNSPECIFIED = 0; @@ -498,6 +518,8 @@ message ConnectionSetting { OBJECT_STORAGE = 4; MONITORING = 5; POSTGRESQL_CLUSTER = 6; + GREENPLUM_CLUSTER = 7; + MYSQL_CLUSTER = 8; } oneof connection { @@ -507,6 +529,8 @@ message ConnectionSetting { ObjectStorageConnection object_storage = 4; Monitoring monitoring = 5; PostgreSQLCluster postgresql_cluster = 6; + GreenplumCluster greenplum_cluster = 7; + MySQLCluster mysql_cluster = 8; } } diff --git a/src/api/protos/draft/persqueue_common.proto b/src/api/protos/draft/persqueue_common.proto index 32643fcefee..d3859038971 100644 --- a/src/api/protos/draft/persqueue_common.proto +++ b/src/api/protos/draft/persqueue_common.proto @@ -2,6 +2,8 @@ syntax = "proto3"; import "google/protobuf/descriptor.proto"; import "src/api/protos/draft/persqueue_error_codes.proto"; +import "src/api/protos/annotations/sensitive.proto"; + package NPersQueueCommon; option java_package = "com.yandex.ydb.persqueue"; @@ -35,8 +37,7 @@ enum ECodec { message Credentials { oneof credentials { - bytes tvm_service_ticket = 1; - bytes oauth_token = 2; + bytes tvm_service_ticket = 1 [(Ydb.sensitive) = true]; + bytes oauth_token = 2 [(Ydb.sensitive) = true]; } } - diff --git a/src/api/protos/draft/persqueue_error_codes.proto b/src/api/protos/draft/persqueue_error_codes.proto index a0f67150140..7bc20d53d0f 100644 --- a/src/api/protos/draft/persqueue_error_codes.proto +++ b/src/api/protos/draft/persqueue_error_codes.proto @@ -12,6 +12,7 @@ enum EErrorCode { SOURCEID_DELETED = 24; WRITE_ERROR_PARTITION_IS_FULL = 5; + WRITE_ERROR_PARTITION_INACTIVE = 29; WRITE_ERROR_DISK_IS_FULL = 15; WRITE_ERROR_BAD_OFFSET = 19; diff --git a/src/api/protos/draft/ydb_backup.proto b/src/api/protos/draft/ydb_backup.proto new file mode 100644 index 00000000000..00b6489395e --- /dev/null +++ b/src/api/protos/draft/ydb_backup.proto @@ -0,0 +1,179 @@ +syntax = "proto3"; +option cc_enable_arenas = true; + +package Ydb.Backup; +option java_package = "com.yandex.ydb.backup"; + +import "google/protobuf/timestamp.proto"; + +import "src/api/protos/annotations/validation.proto"; +import "src/api/protos/ydb_operation.proto"; + +// TODO: move to separate proto shared between different services +message S3Settings {} + +message PathList { + repeated string paths = 1; +} + +message S3Storage { + S3Settings s3_settings = 1; + string prefix = 2; + // and some additional storage settings, maybe different storage classes +} + +message LocalStorage {} + +message BackupStorage { + oneof storage { + LocalStorage local = 1; + S3Storage s3 = 2; + // TODO: add file_storage + } +} + +message ChangeStreamChunk { + enum State { + Unspecified = 0; + Working = 1; + Finished = 2; + Broken = 3; + Deleting = 4; + } + + string uuid = 1 [(required) = true]; + State state = 2; + google.protobuf.Timestamp start_time = 3; + google.protobuf.Timestamp end_time = 4; +} + +message FullBackup { + enum State { + Unspecified = 0; + Working = 1; + Finished = 2; + Broken = 3; + Deleting = 4; + } + + string uuid = 1 [(required) = true]; + State state = 2; + google.protobuf.Timestamp time = 3; +} + +message BackupTarget { + oneof target { + PathList explicit_paths = 1; + } +} + +message Restore { + enum State { + Unspecified = 0; + Working = 1; + Finished = 2; + // Stopped + // Cancelled + } + + string uuid = 1 [(required) = true]; +} + +// Look at this as a Binding in YQ +// Or as a View in C++ +message BackupCollection { + enum AccessFlags { + Unspecified = 0x00; + Read = 0x01; + Write = 0x02; + ReadWrite = 0x03; + } + + string uuid = 1 [(required) = true]; + string description = 2; + uint32 access_flags = 3; + optional BackupTarget backup_target = 4; + repeated Restore restores = 5; + BackupStorage storage = 6; + repeated FullBackup full_backups = 7; + repeated ChangeStreamChunk change_stream_chunks = 8; +} + +message FetchBackupCollectionsRequest { + Ydb.Operations.OperationParams operation_params = 1; + BackupStorage backup_storage = 2; +} + +message FetchBackupCollectionsResponse { + // Result of request will be stored inside operation with type FetchBackupCollectionsResult + Ydb.Operations.Operation operation = 1; +} + +message FetchBackupCollectionsResult { + repeated BackupCollection backup_collections = 1; +} + +message ListBackupCollectionsRequest { + Ydb.Operations.OperationParams operation_params = 1; +} + +message ListBackupCollectionsResponse { + // Result of request will be stored inside operation with type ListBackupCollectionsResult + Ydb.Operations.Operation operation = 1; +} + +message ListBackupCollectionsResult { + repeated BackupCollection backup_collections = 1; +} + +message CreateBackupCollectionRequest { + Ydb.Operations.OperationParams operation_params = 1; +} + +message CreateBackupCollectionResponse { + // Result of request will be stored inside operation with type CreateBackupCollectionResult + Ydb.Operations.Operation operation = 1; +} + +message CreateBackupCollectionResult { + BackupCollection backup_collection = 1; +} + +message ReadBackupCollectionRequest { + Ydb.Operations.OperationParams operation_params = 1; +} + +message ReadBackupCollectionResponse { + // Result of request will be stored inside operation with type ReadBackupCollectionResult + Ydb.Operations.Operation operation = 1; +} + +message ReadBackupCollectionResult { + BackupCollection backup_collection = 1; +} + +message UpdateBackupCollectionRequest { + Ydb.Operations.OperationParams operation_params = 1; +} + +message UpdateBackupCollectionResponse { + // Result of request will be stored inside operation with type UpdateBackupCollectionResult + Ydb.Operations.Operation operation = 1; +} + +message UpdateBackupCollectionResult { + BackupCollection backup_collection = 1; +} + +message DeleteBackupCollectionRequest { + Ydb.Operations.OperationParams operation_params = 1; +} + +message DeleteBackupCollectionResponse { + // Result of request will be stored inside operation with type DeleteBackupCollectionResult + Ydb.Operations.Operation operation = 1; +} + +message DeleteBackupCollectionResult { + BackupCollection backup_collection = 1; +} diff --git a/src/api/protos/draft/ydb_maintenance.proto b/src/api/protos/draft/ydb_maintenance.proto index b7cde902526..5afd5aca2ce 100644 --- a/src/api/protos/draft/ydb_maintenance.proto +++ b/src/api/protos/draft/ydb_maintenance.proto @@ -41,6 +41,11 @@ message Node { StorageNode storage = 6; DynamicNode dynamic = 7; } + // start_time defines time when node was registered in cms. + google.protobuf.Timestamp start_time = 8; + // version defines YDB version for current Node. + // For example, 'ydb-stable-24-1'. + string version = 9; } message ListClusterNodesRequest { @@ -60,13 +65,13 @@ enum AvailabilityMode { AVAILABILITY_MODE_UNSPECIFIED = 0; // In this mode allowed: - // - at most 1 unavailable disk in each storage group; + // - at most 1 unavailable disk in each affected storage group; // - at most 1 unavailable state storage ring. // For nodes tenant and cluster policies are followed. AVAILABILITY_MODE_STRONG = 1; // In this mode: - // - total number of an unavailable disks in each storage group + // - total number of an unavailable disks in each affected storage group // shouldn't exceed number of parity parts in that group; // - it is allowed to disable (n_to_select - 1) / 2 state storage rings. // Nodes are handled as in strong mode. @@ -85,6 +90,8 @@ message MaintenanceTaskOptions { // Availability mode. AvailabilityMode availability_mode = 3; bool dry_run = 4; + // Priority of the task. Lower value indicates higher priority. + int32 priority = 5 [(value) = "[-100; 100]"]; } // Used to describe the scope of a single action. diff --git a/src/api/protos/draft/ydb_object_storage.proto b/src/api/protos/draft/ydb_object_storage.proto new file mode 100644 index 00000000000..d3bf004dcef --- /dev/null +++ b/src/api/protos/draft/ydb_object_storage.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +option cc_enable_arenas = true; + +package Ydb.ObjectStorage; +option java_package = "com.yandex.ydb.object_storage"; +option java_outer_classname = "ObjectStorageProtos"; + +import "src/api/protos/ydb_issue_message.proto"; +import "src/api/protos/ydb_value.proto"; +import "src/api/protos/ydb_status_codes.proto"; + +message ListingRequest { + enum EMatchType { + EQUAL = 0; + NOT_EQUAL = 1; + } + string table_name = 1; + TypedValue key_prefix = 2; // A tuple representing all key columns that preceed path column + string path_column_prefix = 3; + string path_column_delimiter = 4; + bytes continuation_token = 5; + TypedValue start_after_key_suffix = 6; // A tuple representing key columns that succeed path column + int32 max_keys = 7; + repeated string columns_to_return = 8; + reserved 9; // Deprecated filter + TypedValue matching_filter = 10; +} + +message ListingResponse { + StatusIds.StatusCode status = 1; + repeated Ydb.Issue.IssueMessage issues = 2; + repeated string common_prefixes = 3; // Folders. + Ydb.ResultSet contents = 4; // Every Contents row starts with key suffix with KeySuffixSize columns + bool is_truncated = 5; + bytes next_continuation_token = 6; +} diff --git a/src/api/protos/draft/ydb_replication.proto b/src/api/protos/draft/ydb_replication.proto index 2c096b2426e..cb2f80c4498 100644 --- a/src/api/protos/draft/ydb_replication.proto +++ b/src/api/protos/draft/ydb_replication.proto @@ -6,6 +6,8 @@ import "src/api/protos/ydb_issue_message.proto"; import "src/api/protos/ydb_operation.proto"; import "src/api/protos/ydb_scheme.proto"; +import "google/protobuf/duration.proto"; + package Ydb.Replication; option java_package = "com.yandex.ydb.replication"; @@ -13,6 +15,8 @@ message DescribeReplicationRequest { Ydb.Operations.OperationParams operation_params = 1; // Replication path. string path = 2 [(required) = true]; + // Include statistics. + bool include_stats = 3; } message DescribeReplicationResponse { @@ -32,6 +36,8 @@ message ConnectionParams { string endpoint = 1; string database = 2; + bool enable_ssl = 5; + string connection_string = 6; oneof credentials { StaticCredentials static_credentials = 3; @@ -40,14 +46,21 @@ message ConnectionParams { } message DescribeReplicationResult { + message Stats { + optional google.protobuf.Duration lag = 1; + optional float initial_scan_progress = 2; + } + message Item { string source_path = 1; string destination_path = 2; optional string source_changefeed_name = 3; uint64 id = 4; + Stats stats = 5; } message RunningState { + Stats stats = 1; } message ErrorState { @@ -67,3 +80,4 @@ message DescribeReplicationResult { DoneState done = 6; } } + diff --git a/src/api/protos/draft/ydb_tablet.proto b/src/api/protos/draft/ydb_tablet.proto new file mode 100644 index 00000000000..0d5d2eeb04b --- /dev/null +++ b/src/api/protos/draft/ydb_tablet.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; +option cc_enable_arenas = true; + +import "src/api/protos/ydb_issue_message.proto"; +import "src/api/protos/ydb_status_codes.proto"; +import "src/api/protos/ydb_value.proto"; + +package Ydb.Tablet; +option java_package = "com.yandex.ydb.tablet"; + +message ExecuteTabletMiniKQLRequest { + // Tablet id for the minikql script + fixed64 tablet_id = 1; + + // Text of the MiniKQL program + string program = 2; + + // Optional map of query parameters + // Parameters may be references using `(Parameter 'NAME ...TYPE)` calls + map parameters = 3; + + // When true any changes by the program will not be committed + bool dry_run = 4; +} + +message ExecuteTabletMiniKQLResponse { + Ydb.StatusIds.StatusCode status = 1; + repeated Ydb.Issue.IssueMessage issues = 2; + + // The value returned by the program + TypedValue result = 3; +} + +message ChangeTabletSchemaRequest { + // Tablet id for schema changes + fixed64 tablet_id = 1; + + // Schema changes in the text format (see the internal NTabletFlatScheme.TSchemeChanges proto message) + // Empty changes are useful to dump current tablet schema + string schema_changes = 2; + + // When true any changes will not be committed + bool dry_run = 3; +} + +message ChangeTabletSchemaResponse { + Ydb.StatusIds.StatusCode status = 1; + repeated Ydb.Issue.IssueMessage issues = 2; + + // The resulting schema of the tablet (see the internal NTabletFlatScheme.TSchemeChanges proto message) + string schema = 3; +} + +message RestartTabletRequest { + // Tablet id to restart + fixed64 tablet_id = 2; +} + +message RestartTabletResponse { + Ydb.StatusIds.StatusCode status = 1; + repeated Ydb.Issue.IssueMessage issues = 2; +} diff --git a/src/api/protos/persqueue_error_codes_v1.proto b/src/api/protos/persqueue_error_codes_v1.proto index caa29021e08..c11c3fad8da 100644 --- a/src/api/protos/persqueue_error_codes_v1.proto +++ b/src/api/protos/persqueue_error_codes_v1.proto @@ -15,6 +15,7 @@ enum ErrorCode { SOURCEID_DELETED = 500024; WRITE_ERROR_PARTITION_IS_FULL = 500005; + WRITE_ERROR_PARTITION_INACTIVE = 500029; WRITE_ERROR_DISK_IS_FULL = 500015; WRITE_ERROR_BAD_OFFSET = 500019; @@ -48,6 +49,8 @@ enum ErrorCode { TABLET_PIPE_DISCONNECTED = 500027; + SCHEMA_ERROR = 500028; + UNKNOWN_TXID = 500030; PRECONDITION_FAILED = 500031; @@ -56,5 +59,4 @@ enum ErrorCode { INVALID_ARGUMENT = 500040; VALIDATION_ERROR = 500080; - } diff --git a/src/api/protos/ydb_cms.proto b/src/api/protos/ydb_cms.proto index a1edbdd1786..3e718b19192 100644 --- a/src/api/protos/ydb_cms.proto +++ b/src/api/protos/ydb_cms.proto @@ -94,6 +94,14 @@ message DatabaseQuotas { // A minimum value of `TtlSettings.run_interval_seconds` that can be specified. // Default is 1800 (15 minutes). uint32 ttl_min_run_internal_seconds = 4; + + message StorageQuotas { + // in theory an arbitrary string, but in practice "hdd" or "ssd" + string unit_kind = 1; + uint64 data_size_hard_quota = 2; + uint64 data_size_soft_quota = 3; + } + repeated StorageQuotas storage_quotas = 6; } // Request to create a new database. For successfull creation diff --git a/src/api/protos/ydb_formats.proto b/src/api/protos/ydb_formats.proto index 272af52629f..287c440982d 100644 --- a/src/api/protos/ydb_formats.proto +++ b/src/api/protos/ydb_formats.proto @@ -9,6 +9,12 @@ message ArrowBatchSettings { } message CsvSettings { + message Quoting { + bool disabled = 1; + bytes quote_char = 2; + bool double_quote_disabled = 3; + } + // Number of rows to skip before CSV data. It should be present only in the first upsert of CSV file. uint32 skip_rows = 1; // Fields delimiter in CSV file. It's "," if not set. @@ -17,4 +23,5 @@ message CsvSettings { bytes null_value = 3; // First not skipped line is a CSV header (list of column names). bool header = 4; + Quoting quoting = 5; } diff --git a/src/api/protos/ydb_issue_message.proto b/src/api/protos/ydb_issue_message.proto index 0d2abc71287..652007b0ab3 100644 --- a/src/api/protos/ydb_issue_message.proto +++ b/src/api/protos/ydb_issue_message.proto @@ -4,7 +4,7 @@ option cc_enable_arenas = true; package Ydb.Issue; option java_package = "com.yandex.ydb"; -// IssueMessage is a transport format for src/library/yql/public/issue library +// IssueMessage is a transport format for ydb/library/yql/public/issue library message IssueMessage { message Position { uint32 row = 1; @@ -16,7 +16,7 @@ message IssueMessage { string message = 2; Position end_position = 3; uint32 issue_code = 4; - // Severity values from src/library/yql/public/issue/protos/issue_severity.proto + // Severity values from ydb/public/sdk/cpp/src/library/yql_common/issue/protos/issue_severity.proto // FATAL = 0; // ERROR = 1; // WARNING = 2; diff --git a/src/api/protos/ydb_monitoring.proto b/src/api/protos/ydb_monitoring.proto index 1dec61b57ff..2e708d4a5be 100644 --- a/src/api/protos/ydb_monitoring.proto +++ b/src/api/protos/ydb_monitoring.proto @@ -118,6 +118,8 @@ message ComputeStatus { StatusFlag.Status overall = 1; repeated ComputeNodeStatus nodes = 2; repeated ComputeTabletStatus tablets = 3; + float paths_quota_usage = 4; + float shards_quota_usage = 5; } message LocationNode { @@ -202,4 +204,5 @@ message SelfCheckResult { SelfCheck.Result self_check_result = 1; repeated IssueLog issue_log = 2; repeated DatabaseStatus database_status = 3; + LocationNode location = 4; } diff --git a/src/api/protos/ydb_operation.proto b/src/api/protos/ydb_operation.proto index cda749c70d1..44cdadab8b3 100644 --- a/src/api/protos/ydb_operation.proto +++ b/src/api/protos/ydb_operation.proto @@ -3,6 +3,7 @@ option cc_enable_arenas = true; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; import "src/api/protos/annotations/validation.proto"; import "src/api/protos/ydb_common.proto"; @@ -103,7 +104,7 @@ message Operation { // not created in the first place, as in SYNC operation mode). string id = 1; - // true - this operation has beed finished (doesn't matter successful or not), + // true - this operation has been completed (doesn't matter successful or not), // so Status field has status code, and Result field can contains result data. // false - this operation still running. You can repeat request using operation Id. bool ready = 2; @@ -120,4 +121,13 @@ message Operation { // For completed operations, it shows the final cost of the operation. // For operations in progress, it might indicate the current cost of the operation (if supported). CostInfo cost_info = 7; + + // The time at which this operation was created (if supported). + google.protobuf.Timestamp create_time = 8; + + // The time at which this operation was completed, doesn't matter successful or not (if supported). + google.protobuf.Timestamp end_time = 9; + + // User SID (Security ID) of the user who created this operation (if supported). + string created_by = 10; } diff --git a/src/api/protos/ydb_persqueue_v1.proto b/src/api/protos/ydb_persqueue_v1.proto index bcdf15b7661..2d5c070cbc3 100644 --- a/src/api/protos/ydb_persqueue_v1.proto +++ b/src/api/protos/ydb_persqueue_v1.proto @@ -3,6 +3,7 @@ import "src/api/protos/ydb_operation.proto"; import "src/api/protos/ydb_scheme.proto"; import "src/api/protos/ydb_status_codes.proto"; import "src/api/protos/ydb_issue_message.proto"; +import "src/api/protos/annotations/sensitive.proto"; import "src/api/protos/annotations/validation.proto"; import "google/protobuf/duration.proto"; @@ -40,7 +41,7 @@ message OffsetsRange { // In-session reauthentication and reauthorization, lets user increase session lifetime. You should wait for 'update_token_response' before sending next 'update_token_request'. message UpdateTokenRequest { - string token = 1; + string token = 1 [(Ydb.sensitive) = true]; } message UpdateTokenResponse { @@ -790,7 +791,7 @@ message MigrationStreamingReadClientMessage { } // User credentials if update is needed or empty string. - bytes token = 20; + bytes token = 20 [(Ydb.sensitive) = true]; } /** @@ -1075,22 +1076,24 @@ message Credentials { string service_account_key = 2; } oneof credentials { - string oauth_token = 1; - string jwt_params = 2; + string oauth_token = 1 [(Ydb.sensitive) = true]; + string jwt_params = 2 [(Ydb.sensitive) = true]; Iam iam = 3; } } -enum AutoscalingStrategy { - // The autoscaling algorithm is not specified. The default value will be used. - AUTOSCALING_STRATEGY_UNSPECIFIED = 0; - // The autoscaling is disabled. - AUTOSCALING_STRATEGY_DISABLED = 1; - // The autoscaling algorithm will increase partitions count depending on the load characteristics. - // The autoscaling algorithm will never decrease the number of partitions. - AUTOSCALING_STRATEGY_SCALE_UP = 2; - // The autoscaling algorithm will both increase and decrease partitions count depending on the load characteristics. - AUTOSCALING_STRATEGY_SCALE_UP_AND_DOWN = 3; +enum AutoPartitioningStrategy { + // The auto partitioning algorithm is not specified. The default value will be used. + AUTO_PARTITIONING_STRATEGY_UNSPECIFIED = 0; + // The auto partitioning is disabled. + AUTO_PARTITIONING_STRATEGY_DISABLED = 1; + // The auto partitioning algorithm will increase partitions count depending on the load characteristics. + // The auto partitioning algorithm will never decrease the number of partitions. + AUTO_PARTITIONING_STRATEGY_SCALE_UP = 2; + // The auto partitioning algorithm will both increase and decrease partitions count depending on the load characteristics. + AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN = 3; + // The auto partitioning is paused. + AUTO_PARTITIONING_STRATEGY_PAUSED = 4; } /** @@ -1102,12 +1105,12 @@ message TopicSettings { FORMAT_BASE = 1; } - oneof partitioning { - // How many partitions in topic. Must less than database limit. Default limit - 10. - int32 partitions_count = 1 [(value) = "> 0"]; - // Settings for the partitions count autoscaling. - AutoscalingSettings autoscaling_settings = 15; - }; + + // How many partitions in topic. Must less than database limit. Default limit - 10. + int32 partitions_count = 1 [(value) = "> 0"]; + // Settings for the partitions count auto partitioning. + AutoPartitioningSettings auto_partitioning_settings = 15; + oneof retention { // How long data in partition should be stored. Must be greater than 0 and less than limit for this database. @@ -1183,9 +1186,9 @@ message TopicSettings { RemoteMirrorRule remote_mirror_rule = 11; } -message AutoscalingSettings { - // Strategy of autoscaling. - AutoscalingStrategy strategy = 1; +message AutoPartitioningSettings { + // Strategy of auto partitioning. + AutoPartitioningStrategy strategy = 1; // Auto merge would stop working when the partitions count reaches min_active_partitions. // Zero value means default - 1. @@ -1197,24 +1200,24 @@ message AutoscalingSettings { // Zero value means default - 100. int64 partition_count_limit = 4 [(Ydb.value) = ">= 0", deprecated = true]; - // Partition write speed autoscaling options. - AutoscalingPartitionWriteSpeedStrategy partition_write_speed = 5; + // Partition write speed auto partitioning options. + AutoPartitioningWriteSpeedStrategy partition_write_speed = 5; } -message AutoscalingPartitionWriteSpeedStrategy { - //Partition will be autoscaled up (divided into 2 partitions) - //after write speed to the partition exceeds scale_up_threshold_percent (in percentage of maximum write speed to the partition) for the period of time threshold_time_seconds +message AutoPartitioningWriteSpeedStrategy { + //Partition will be auto partitioning up (divided into 2 partitions) + //after write speed to the partition exceeds up_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window - //Partition will become a candidate to the autoscaling down - //after write speed doesn’t reach scale_down_threshold_percent (in percentage of maximum write speed to the partition) for the period of time threshold_time_seconds - //This candidate partition will be autoscaled down when other neighbour partition will become a candidate to the autoscaling down and not earlier than a retention period. + //Partition will become a candidate to the auto partitioning down + //after write speed doesn’t reach down_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window + //This candidate partition will be auto partitioned down when other neighbour partition will become a candidate to the auto partitioning down and not earlier than a retention period. // Zero value means default - 300. - google.protobuf.Duration threshold_time = 1; + google.protobuf.Duration stabilization_window = 1; // Zero value means default - 90. - int32 scale_up_threshold_percent = 2 [(Ydb.value) = ">= 0"]; + int32 up_utilization_percent = 2 [(Ydb.value) = ">= 0"]; // Zero value means default - 30. - int32 scale_down_threshold_percent = 3 [(Ydb.value) = ">= 0"]; + int32 down_utilization_percent = 3 [(Ydb.value) = ">= 0"]; } /** diff --git a/src/api/protos/ydb_query.proto b/src/api/protos/ydb_query.proto index 4bccd419fe7..10db905670f 100644 --- a/src/api/protos/ydb_query.proto +++ b/src/api/protos/ydb_query.proto @@ -170,6 +170,8 @@ message ExecuteQueryRequest { // Allows to set size limitation (in bytes) for one result part int64 response_part_limit_bytes = 9 [(Ydb.value) = "[0; 33554432]"]; + + string pool_id = 10; // Workload manager pool id } message ResultSetMeta { @@ -205,6 +207,8 @@ message ExecuteScriptRequest { // After script execution operation finishes, TTL will start counting. // After this TTL the results will be removed from database. google.protobuf.Duration results_ttl = 6; + + string pool_id = 7; // Workload manager pool id } enum ExecStatus { diff --git a/src/api/protos/ydb_scheme.proto b/src/api/protos/ydb_scheme.proto index 12ec035a96d..3a413f49d5f 100644 --- a/src/api/protos/ydb_scheme.proto +++ b/src/api/protos/ydb_scheme.proto @@ -64,6 +64,7 @@ message Entry { EXTERNAL_TABLE = 18; EXTERNAL_DATA_SOURCE = 19; VIEW = 20; + RESOURCE_POOL = 21; } // Name of scheme entry (dir2 of /dir1/dir2) diff --git a/src/api/protos/ydb_table.proto b/src/api/protos/ydb_table.proto index b411234d251..7635437b323 100644 --- a/src/api/protos/ydb_table.proto +++ b/src/api/protos/ydb_table.proto @@ -14,6 +14,7 @@ import "src/api/protos/ydb_formats.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; package Ydb.Table; @@ -46,13 +47,66 @@ message DeleteSessionResponse { Ydb.Operations.Operation operation = 1; } +message GlobalIndexSettings { + oneof partitions { + // Enable uniform partitioning of the table that implements the index using the specified partition count. + // Note that the index columns must be of type Uint32 or Uint64. + uint64 uniform_partitions = 1; + // Explicitly specify the key values of the index columns that define the partition boundaries + // for the table implementing the index. + ExplicitPartitions partition_at_keys = 2; + } + // Partitioning settings for the table that implements the index. + PartitioningSettings partitioning_settings = 3; +} + +message VectorIndexSettings { + enum Distance { + DISTANCE_UNSPECIFIED = 0; + DISTANCE_COSINE = 1; + DISTANCE_MANHATTAN = 2; + DISTANCE_EUCLIDEAN = 3; + } + + enum Similarity { + SIMILARITY_UNSPECIFIED = 0; + SIMILARITY_COSINE = 1; + SIMILARITY_INNER_PRODUCT = 2; + } + + enum VectorType { + VECTOR_TYPE_UNSPECIFIED = 0; + VECTOR_TYPE_FLOAT = 1; + VECTOR_TYPE_UINT8 = 2; + VECTOR_TYPE_INT8 = 3; + VECTOR_TYPE_BIT = 4; + } + + oneof metric { + Distance distance = 1; + Similarity similarity = 2; + } + VectorType vector_type = 3; + + uint32 vector_dimension = 4; +} + message GlobalIndex { + GlobalIndexSettings settings = 1; } message GlobalAsyncIndex { + GlobalIndexSettings settings = 1; } message GlobalUniqueIndex { + GlobalIndexSettings settings = 1; +} + +message GlobalVectorKMeansTreeIndex { + GlobalIndexSettings level_table_settings = 1; + GlobalIndexSettings posting_table_settings = 2; + VectorIndexSettings vector_settings = 3; } // Represent secondary index @@ -66,6 +120,7 @@ message TableIndex { GlobalIndex global_index = 3; GlobalAsyncIndex global_async_index = 4; GlobalUniqueIndex global_unique_index = 6; + GlobalVectorKMeansTreeIndex global_vector_kmeans_tree_index = 7; } // list of columns content to be copied in to index table repeated string data_columns = 5; @@ -89,6 +144,7 @@ message TableIndexDescription { GlobalIndex global_index = 3; GlobalAsyncIndex global_async_index = 5; GlobalUniqueIndex global_unique_index = 8; + GlobalVectorKMeansTreeIndex global_vector_kmeans_tree_index = 9; } Status status = 4; // list of columns content to be copied in to index table @@ -191,6 +247,11 @@ message ChangefeedDescription { STATE_INITIAL_SCAN = 3; } + message InitialScanProgress { + uint32 parts_total = 1; + uint32 parts_completed = 2; + } + // Name of the feed string name = 1; // Mode specifies the information that will be written to the feed @@ -207,6 +268,8 @@ message ChangefeedDescription { string aws_region = 7; // Interval of emitting of resolved timestamps. If unspecified, resolved timestamps are not emitted. google.protobuf.Duration resolved_timestamps_interval = 8; + // Progress of initial scan. If unspecified, initial scan was not launched. + InitialScanProgress initial_scan_progress = 9; } message StoragePool { @@ -333,6 +396,22 @@ message TableProfile { CachingPolicy caching_policy = 7; } +message SequenceDescription { + message SetVal { + optional sint64 next_value = 1; + optional bool next_used = 2; + } + optional string name = 1; // mandatorys + optional sint64 min_value = 2; // minimum value, defaults to 1 or Min + optional sint64 max_value = 3; // maximum value, defaults to Max or -1 + optional sint64 start_value = 4; // start value, defaults to min_value + optional uint64 cache = 5; // number of items to cache, defaults to 1 + optional sint64 increment = 6; // increment at each call, defaults to 1 + optional bool cycle = 7; // true when cycle on overflow is allowed + optional SetVal set_val = 8; // set_val(next_value, next_used) is executed atomically when creating + optional Type data_type = 9; // data type of the sequence +} + message ColumnMeta { // Name of column string name = 1; @@ -342,6 +421,12 @@ message ColumnMeta { string family = 3; // Column nullability optional bool not_null = 4; + // Column default value option + oneof default_value { + TypedValue from_literal = 5; + SequenceDescription from_sequence = 6; + google.protobuf.NullValue empty_default = 7; + } } message DateTypeColumnModeSettings { diff --git a/src/api/protos/ydb_topic.proto b/src/api/protos/ydb_topic.proto index 858e0a6de81..fd58739521f 100644 --- a/src/api/protos/ydb_topic.proto +++ b/src/api/protos/ydb_topic.proto @@ -3,6 +3,7 @@ import "src/api/protos/ydb_operation.proto"; import "src/api/protos/ydb_scheme.proto"; import "src/api/protos/ydb_status_codes.proto"; import "src/api/protos/ydb_issue_message.proto"; +import "src/api/protos/annotations/sensitive.proto"; import "src/api/protos/annotations/validation.proto"; import "google/protobuf/duration.proto"; @@ -43,7 +44,7 @@ message OffsetsRange { // In-session reauthentication and reauthorization, lets user increase session lifetime. // Client should wait for UpdateTokenResponse before sending next UpdateTokenRequest. message UpdateTokenRequest { - string token = 1; + string token = 1 [(Ydb.sensitive) = true]; } message UpdateTokenResponse { @@ -167,7 +168,7 @@ message StreamWriteMessage { // Explicit partition id to write to. int64 partition_id = 6; // Explicit partition location to write to. - PartitionWithGeneration partition_with_generation = 8; + PartitionWithGeneration partition_with_generation = 8; } // Message metadata. Overall size is limited to 4096 symbols (all keys and values combined). repeated MetadataItem metadata_items = 7 [(Ydb.size).le = 1000]; @@ -197,6 +198,7 @@ message StreamWriteMessage { oneof message_write_status { Written written = 2; Skipped skipped = 3; + WrittenInTx written_in_tx = 4; } message Written { @@ -212,6 +214,9 @@ message StreamWriteMessage { REASON_ALREADY_WRITTEN = 1; } } + + message WrittenInTx { + } } // Message with write statistics. @@ -321,8 +326,8 @@ message StreamReadMessage { string reader_name = 3; // Direct reading from a partition node. bool direct_read = 4; - // Indicates that the SDK supports autoscaling. - bool autoscaling_support = 5; + // Indicates that the SDK supports auto partitioning. + bool auto_partitioning_support = 5; message TopicReadSettings { // Topic path. @@ -488,7 +493,7 @@ message StreamReadMessage { PartitionLocation partition_location = 4; } - // Signal for server that cient is ready to recive data for partition. + // Signal for server that client is ready to recive data for partition. message StartPartitionSessionResponse { // Partition session identifier of partition to start read. int64 partition_session_id = 1; @@ -537,7 +542,7 @@ message StreamReadMessage { // Flag of graceful stop, used only when InitRequest.direct_read is true // Client must pass this value unchanged from the StopPartitionSessionRequest. - // Server can sent two StopPartitionSessionRequests, the first with graceful=true, the second with graceful=false. The client must answer both of them. + // Server can sent two StopPartitionSessionRequests, the first with graceful=true, the second with graceful=false. The client must answer both of them. bool graceful = 2; } @@ -580,22 +585,25 @@ message StreamReadMessage { // Messages for bidirectional streaming rpc StreamDirectRead message StreamDirectReadMessage { - // Client-server message for direct read session. - // InitDirectRead - command from client to create and start a direct read session. - // StartDirectReadPartitionSession - command from client to create and start a direct read partition session. - // UpdateTokenRequest - request to update auth token + // Client-server message for direct read session. + // InitRequest - command from client to create and start a direct read session. + // StartDirectReadPartitionSessionRequest - command from client to create and start a direct read partition session. + // Client signals it is ready to get data from partition. + // UpdateTokenRequest - request to update auth token message FromClient { oneof client_message { - InitDirectRead init_direct_read = 1; - StartDirectReadPartitionSession start_direct_read_partition_session = 2; - UpdateTokenRequest update_token_request = 3; + InitRequest init_request = 1; + StartDirectReadPartitionSessionRequest start_direct_read_partition_session_request = 2; + UpdateTokenRequest update_token_request = 3; } } - // Server-client message for direct read session. + // Server-client message for direct read session. + // InitResponse - correct handshake response. + // StartDirectReadPartitionSessionResponse - Response to StartDirectReadPartitionSessionRequest. // DirectReadResponse - portion of message data. // StopDirectReadPartitionSession - command from server to stop a direct read partition session. - // UpdateTokenResponse - acknowledgment of token update. + // UpdateTokenResponse - acknowledgment of token update. message FromServer { // Server status of response. Ydb.StatusIds.StatusCode status = 1; @@ -603,8 +611,9 @@ message StreamDirectReadMessage { // Issues if any. repeated Ydb.Issue.IssueMessage issues = 2; - oneof server_message { + InitResponse init_response = 6; + StartDirectReadPartitionSessionResponse start_direct_read_partition_session_response = 7; StopDirectReadPartitionSession stop_direct_read_partition_session = 3; DirectReadResponse direct_read_response = 4; UpdateTokenResponse update_token_response = 5; @@ -613,7 +622,7 @@ message StreamDirectReadMessage { // Command from client to create and start a direct read session. // Server should not send a response to the command. - message InitDirectRead { + message InitRequest { // Read session identifier. string session_id = 1; // Topics that will be read by this session. @@ -627,9 +636,12 @@ message StreamDirectReadMessage { } } + // Response to the handshake. + message InitResponse { + } + // Command from client to create and start a direct read partition session. - // Server should not send a response to the command. - message StartDirectReadPartitionSession { + message StartDirectReadPartitionSessionRequest { // Partition session identifier. int64 partition_session_id = 1; @@ -640,6 +652,15 @@ message StreamDirectReadMessage { int64 generation = 3; } + // Signal for server that client is ready to receive data for partition. + message StartDirectReadPartitionSessionResponse { + // Partition session identifier of partition to start read. + int64 partition_session_id = 1; + + // Partition generation. + int64 generation = 2; + } + // Command from server to stop a direct read partition session. // Client should not send a response to the command. message StopDirectReadPartitionSession { @@ -651,21 +672,23 @@ message StreamDirectReadMessage { // Partition session identifier. int64 partition_session_id = 3; - } + // Partition generation. + int64 generation = 4; + } // Messages that have been read directly from the partition node. // It's a response to StreamRead.ReadRequest message DirectReadResponse { // Partition session identifier. int64 partition_session_id = 1; - + // Read request identifier. int64 direct_read_id = 2; // Messages data StreamReadMessage.ReadResponse.PartitionData partition_data = 3; - } + } } message TransactionIdentity { @@ -813,16 +836,18 @@ message AlterConsumer { map alter_attributes = 6; } -enum AutoscalingStrategy { - // The autoscaling algorithm is not specified. The default value will be used. - AUTOSCALING_STRATEGY_UNSPECIFIED = 0; - // The autoscaling is disabled. - AUTOSCALING_STRATEGY_DISABLED = 1; - // The autoscaling algorithm will increase partitions count depending on the load characteristics. - // The autoscaling algorithm will never decrease the number of partitions. - AUTOSCALING_STRATEGY_SCALE_UP = 2; - // The autoscaling algorithm will both increase and decrease partitions count depending on the load characteristics. - AUTOSCALING_STRATEGY_SCALE_UP_AND_DOWN = 3; +enum AutoPartitioningStrategy { + // The auto partitioning algorithm is not specified. The default value will be used. + AUTO_PARTITIONING_STRATEGY_UNSPECIFIED = 0; + // The auto partitioning is disabled. + AUTO_PARTITIONING_STRATEGY_DISABLED = 1; + // The auto partitioning algorithm will increase partitions count depending on the load characteristics. + // The auto partitioning algorithm will never decrease the number of partitions. + AUTO_PARTITIONING_STRATEGY_SCALE_UP = 2; + // The auto partitioning algorithm will both increase and decrease partitions count depending on the load characteristics. + AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN = 3; + // The auto partitioning is paused. + AUTO_PARTITIONING_STRATEGY_PAUSED = 4; } // Partitioning settings for topic. @@ -837,31 +862,31 @@ message PartitioningSettings { // Zero value means default - 100. // Use max_active_partitions int64 partition_count_limit = 2 [(Ydb.value) = ">= 0", deprecated = true]; - // Settings for the partitions count autoscaling. - AutoscalingSettings autoscaling_settings = 4; + // Settings for the partitions count auto partitioning. + AutoPartitioningSettings auto_partitioning_settings = 4; } -message AutoscalingSettings { - // Strategy of autoscaling. - AutoscalingStrategy strategy = 1; - // Partition write speed autoscaling options. - AutoscalingPartitionWriteSpeedStrategy partition_write_speed = 2; +message AutoPartitioningSettings { + // Strategy of auto partitioning. + AutoPartitioningStrategy strategy = 1; + // Partition write speed auto partitioning options. + AutoPartitioningWriteSpeedStrategy partition_write_speed = 2; } -message AutoscalingPartitionWriteSpeedStrategy { - //Partition will be autoscaled up (divided into 2 partitions) - //after write speed to the partition exceeds scale_up_threshold_percent (in percentage of maximum write speed to the partition) for the period of time threshold_time_seconds +message AutoPartitioningWriteSpeedStrategy { + //Partition will be auto partitioned up (divided into 2 partitions) + //after write speed to the partition exceeds up_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window - //Partition will become a candidate to the autoscaling down - //after write speed doesn’t reach scale_down_threshold_percent (in percentage of maximum write speed to the partition) for the period of time threshold_time_seconds - //This candidate partition will be autoscaled down when other neighbour partition will become a candidate to the autoscaling down and not earlier than a retention period. + //Partition will become a candidate to the auto partitioned down + //after write speed doesn’t reach down_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window + //This candidate partition will be auto partitioned down when other neighbour partition will become a candidate to the auto partitioning down and not earlier than a retention period. // Zero value means default - 300. - google.protobuf.Duration threshold_time = 1; + google.protobuf.Duration stabilization_window = 1; // Zero value means default - 90. - int32 scale_up_threshold_percent = 2 [(Ydb.value) = ">= 0"]; + int32 up_utilization_percent = 2 [(Ydb.value) = ">= 0"]; // Zero value means default - 30. - int32 scale_down_threshold_percent = 3 [(Ydb.value) = ">= 0"]; + int32 down_utilization_percent = 3 [(Ydb.value) = ">= 0"]; } // Partitioning settings for topic. @@ -876,30 +901,30 @@ message AlterPartitioningSettings { // Zero value means default - 100. // Use set_max_active_partitions optional int64 set_partition_count_limit = 2 [(Ydb.value) = ">= 0", deprecated = true]; - // Settings for autoscaling the partition number - optional AlterAutoscalingSettings alter_autoscaling_settings = 4; + // Settings for auto partitioning the partition number + optional AlterAutoPartitioningSettings alter_auto_partitioning_settings = 4; } -message AlterAutoscalingSettings { - // Strategy of autoscaling - optional AutoscalingStrategy set_strategy = 1; - // Autoscaling partition write speed options. - optional AlterAutoscalingPartitionWriteSpeedStrategy set_partition_write_speed = 2; +message AlterAutoPartitioningSettings { + // Strategy of auto partitioning + optional AutoPartitioningStrategy set_strategy = 1; + // Auto partitioning write speed options. + optional AlterAutoPartitioningWriteSpeedStrategy set_partition_write_speed = 2; } -message AlterAutoscalingPartitionWriteSpeedStrategy { +message AlterAutoPartitioningWriteSpeedStrategy { // The time of exceeding the threshold value, after which the partition will be - // autoscaling. + // auto partitioning. // Zero value means default - 300. - optional google.protobuf.Duration set_threshold_time = 1; + optional google.protobuf.Duration set_stabilization_window = 1; // The threshold value of the write speed to the partition as a percentage, when exceeded, // the partition will be auto split. // Zero value means default - 90. - optional int32 set_scale_up_threshold_percent = 2 [(Ydb.value) = ">= 0"]; + optional int32 set_up_utilization_percent = 2 [(Ydb.value) = ">= 0"]; // The threshold value of the write speed to the partition as a percentage, if it is not reached, // the partition will be auto merged. // Zero value means default - 30. - optional int32 set_scale_down_threshold_percent = 3 [(Ydb.value) = ">= 0"]; + optional int32 set_down_utilization_percent = 3 [(Ydb.value) = ">= 0"]; } // Metering mode specifies the method used to determine consumption of resources by the topic. @@ -929,7 +954,7 @@ message CreateTopicRequest { // How long data in partition should be stored. Must be greater than 0 and less than limit for this database. // Default limit - 36 hours. google.protobuf.Duration retention_period = 4; - + // How much data in partition should be stored. Must be greater than 0 and less than limit for this database. // Zero value means infinite limit. int64 retention_storage_mb = 5 [(Ydb.value) = ">= 0"]; @@ -1000,6 +1025,13 @@ message DescribeTopicResponse { Ydb.Operations.Operation operation = 1; } +message PartitionKeyRange { + // Inclusive left border. Emptiness means -inf. + optional bytes from_bound = 1; + // Exclusive right border. Emptiness means +inf. + optional bytes to_bound = 2; +} + // Describe topic result message that will be inside DescribeTopicResponse.operation. message DescribeTopicResult { // Description of scheme object. @@ -1009,7 +1041,7 @@ message DescribeTopicResult { // Settings for partitioning PartitioningSettings partitioning_settings = 2; - + // Partitions description. repeated PartitionInfo partitions = 3; @@ -1018,7 +1050,7 @@ message DescribeTopicResult { // // How long data in partition should be stored. google.protobuf.Duration retention_period = 4; - + // How much data in partition should be stored. // Zero value means infinite limit. int64 retention_storage_mb = 5; @@ -1029,7 +1061,7 @@ message DescribeTopicResult { // Writes with codec not from this list are forbidden. // If empty, codec compatibility check for the topic is disabled. SupportedCodecs supported_codecs = 7; - + // Partition write speed in bytes per second. // Zero value means default limit: 1 MB per second. int64 partition_write_speed_bytes_per_second = 8; @@ -1068,6 +1100,8 @@ message DescribeTopicResult { // Partition location, filled only when include_location in request is true. PartitionLocation partition_location = 6; + + PartitionKeyRange key_range = 7; } message TopicStats { @@ -1107,7 +1141,7 @@ message DescribePartitionResponse { Ydb.Operations.Operation operation = 1; } -// Describe partition result message that will be inside DescribeTopicResponse.operation. +// Describe partition result message that will be inside DescribePartitionResponse.operation. message DescribePartitionResult { // Partitions description. DescribeTopicResult.PartitionInfo partition = 1; @@ -1221,7 +1255,7 @@ message AlterTopicRequest { // How long data in partition should be stored. Must be greater than 0 and less than limit for this database. // Default limit - 36 hours. google.protobuf.Duration set_retention_period = 4; - + // How much data in partition should be stored. Must be greater than 0 and less than limit for this database. optional int64 set_retention_storage_mb = 5 [(Ydb.value) = ">= 0"]; @@ -1234,7 +1268,7 @@ message AlterTopicRequest { // Partition write speed in bytes per second. Must be less than database limit. Default limit - 1 MB/s. optional int64 set_partition_write_speed_bytes_per_second = 8 [(Ydb.value) = ">= 0"]; - + // Burst size for write in partition, in bytes. Must be less than database limit. Default limit - 1 MB. optional int64 set_partition_write_burst_bytes = 9 [(Ydb.value) = ">= 0"]; diff --git a/src/client/coordination/coordination.cpp b/src/client/coordination/coordination.cpp index 8140712fb09..ba457838f3d 100644 --- a/src/client/coordination/coordination.cpp +++ b/src/client/coordination/coordination.cpp @@ -5,7 +5,7 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include +#include #include #include diff --git a/src/client/draft/ydb_dynamic_config.cpp b/src/client/draft/ydb_dynamic_config.cpp index 673e8ef83aa..aab5d7b5d48 100644 --- a/src/client/draft/ydb_dynamic_config.cpp +++ b/src/client/draft/ydb_dynamic_config.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/src/client/draft/ydb_replication.cpp b/src/client/draft/ydb_replication.cpp index 5aa7926719f..8e7fccf96f9 100644 --- a/src/client/draft/ydb_replication.cpp +++ b/src/client/draft/ydb_replication.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/src/client/draft/ydb_scripting.cpp b/src/client/draft/ydb_scripting.cpp index 93a8fb923ec..a4c761ee30e 100644 --- a/src/client/draft/ydb_scripting.cpp +++ b/src/client/draft/ydb_scripting.cpp @@ -5,8 +5,8 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include -#include +#include +#include #include namespace NYdb { diff --git a/src/client/export/export.cpp b/src/client/export/export.cpp index c8b5fecc04c..44d952d8896 100644 --- a/src/client/export/export.cpp +++ b/src/client/export/export.cpp @@ -4,9 +4,9 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/client/federated_topic/impl/federated_topic_impl.h b/src/client/federated_topic/impl/federated_topic_impl.h index 3121aa275f3..14991b4bdf5 100644 --- a/src/client/federated_topic/impl/federated_topic_impl.h +++ b/src/client/federated_topic/impl/federated_topic_impl.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/src/client/federated_topic/impl/federation_observer.cpp b/src/client/federated_topic/impl/federation_observer.cpp index 5596795e4c0..89a9c2d1349 100644 --- a/src/client/federated_topic/impl/federation_observer.cpp +++ b/src/client/federated_topic/impl/federation_observer.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/src/client/federated_topic/impl/federation_observer.h b/src/client/federated_topic/impl/federation_observer.h index 0d52f3a9b47..e35c1d858d5 100644 --- a/src/client/federated_topic/impl/federation_observer.h +++ b/src/client/federated_topic/impl/federation_observer.h @@ -5,7 +5,7 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include +#include #include #include diff --git a/src/client/iam/common/iam.cpp b/src/client/iam/common/iam.cpp index ddf1df91f07..4b423545959 100644 --- a/src/client/iam/common/iam.cpp +++ b/src/client/iam/common/iam.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include using namespace NYdbGrpc; using namespace yandex::cloud::iam::v1; diff --git a/src/client/iam_private/iam.cpp b/src/client/iam_private/iam.cpp index 2d414567dba..a649c36d3ea 100644 --- a/src/client/iam_private/iam.cpp +++ b/src/client/iam_private/iam.cpp @@ -2,8 +2,8 @@ #include -#include -#include +#include +#include namespace NYdb { diff --git a/src/client/impl/ydb_internal/db_driver_state/endpoint_pool.h b/src/client/impl/ydb_internal/db_driver_state/endpoint_pool.h index 847b30dc602..638105469d2 100644 --- a/src/client/impl/ydb_internal/db_driver_state/endpoint_pool.h +++ b/src/client/impl/ydb_internal/db_driver_state/endpoint_pool.h @@ -2,7 +2,7 @@ #include -#include +#include #include #include #include diff --git a/src/client/impl/ydb_internal/grpc_connections/actions.cpp b/src/client/impl/ydb_internal/grpc_connections/actions.cpp index e20ba4afdef..65a152240f2 100644 --- a/src/client/impl/ydb_internal/grpc_connections/actions.cpp +++ b/src/client/impl/ydb_internal/grpc_connections/actions.cpp @@ -2,7 +2,7 @@ #include "actions.h" #include "grpc_connections.h" -#include +#include namespace NYdb { diff --git a/src/client/impl/ydb_internal/grpc_connections/actions.h b/src/client/impl/ydb_internal/grpc_connections/actions.h index 756a5ae5a97..029035068af 100644 --- a/src/client/impl/ydb_internal/grpc_connections/actions.h +++ b/src/client/impl/ydb_internal/grpc_connections/actions.h @@ -2,7 +2,7 @@ #include -#include +#include #include #include #include diff --git a/src/client/impl/ydb_internal/grpc_connections/grpc_connections.h b/src/client/impl/ydb_internal/grpc_connections/grpc_connections.h index 0a30f220c3b..ed4e2af4c50 100644 --- a/src/client/impl/ydb_internal/grpc_connections/grpc_connections.h +++ b/src/client/impl/ydb_internal/grpc_connections/grpc_connections.h @@ -6,7 +6,7 @@ #include "actions.h" #include "params.h" -#include +#include #include #include #include diff --git a/src/client/impl/ydb_internal/make_request/make.h b/src/client/impl/ydb_internal/make_request/make.h index 1bee7a40893..ab11ef77d05 100644 --- a/src/client/impl/ydb_internal/make_request/make.h +++ b/src/client/impl/ydb_internal/make_request/make.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include diff --git a/src/client/impl/ydb_internal/plain_status/status.h b/src/client/impl/ydb_internal/plain_status/status.h index e1a17cddf1a..295fea794ae 100644 --- a/src/client/impl/ydb_internal/plain_status/status.h +++ b/src/client/impl/ydb_internal/plain_status/status.h @@ -9,7 +9,7 @@ #include -#include +#include namespace NYdb { diff --git a/src/client/impl/ydb_internal/table_helpers/helpers.h b/src/client/impl/ydb_internal/table_helpers/helpers.h index da444b76864..2749a59dd3a 100644 --- a/src/client/impl/ydb_internal/table_helpers/helpers.h +++ b/src/client/impl/ydb_internal/table_helpers/helpers.h @@ -2,7 +2,7 @@ #include -#include +#include #include namespace NYdb { diff --git a/src/client/impl/ydb_internal/value_helpers/helpers.h b/src/client/impl/ydb_internal/value_helpers/helpers.h index a2df12e4b98..54cc366e1b4 100644 --- a/src/client/impl/ydb_internal/value_helpers/helpers.h +++ b/src/client/impl/ydb_internal/value_helpers/helpers.h @@ -2,7 +2,7 @@ #include -#include +#include namespace NYdb { diff --git a/src/client/import/import.cpp b/src/client/import/import.cpp index 3fa34004823..64f352c844a 100644 --- a/src/client/import/import.cpp +++ b/src/client/import/import.cpp @@ -4,9 +4,9 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/client/monitoring/monitoring.cpp b/src/client/monitoring/monitoring.cpp index 51b42a572d1..8650dd22cef 100644 --- a/src/client/monitoring/monitoring.cpp +++ b/src/client/monitoring/monitoring.cpp @@ -4,8 +4,8 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include -#include +#include +#include #include #include diff --git a/src/client/operation/operation.cpp b/src/client/operation/operation.cpp index c8cf5231bbe..95907b967b8 100644 --- a/src/client/operation/operation.cpp +++ b/src/client/operation/operation.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/src/client/params/impl.cpp b/src/client/params/impl.cpp index 78d52469dc6..63c91ef60b0 100644 --- a/src/client/params/impl.cpp +++ b/src/client/params/impl.cpp @@ -1,7 +1,7 @@ #include "impl.h" -#include -#include +#include +#include namespace NYdb { diff --git a/src/client/params/params.cpp b/src/client/params/params.cpp index 00d0d80b7cf..c15b144bca7 100644 --- a/src/client/params/params.cpp +++ b/src/client/params/params.cpp @@ -2,7 +2,7 @@ #include -#include +#include #include diff --git a/src/client/persqueue_public/impl/persqueue_impl.h b/src/client/persqueue_public/impl/persqueue_impl.h index e4f0cbf3844..a0edce9ca09 100644 --- a/src/client/persqueue_public/impl/persqueue_impl.h +++ b/src/client/persqueue_public/impl/persqueue_impl.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #define INCLUDE_YDB_INTERNAL_H diff --git a/src/client/persqueue_public/include/control_plane.h b/src/client/persqueue_public/include/control_plane.h index 4dffb0ba843..c8cc2ec7e35 100644 --- a/src/client/persqueue_public/include/control_plane.h +++ b/src/client/persqueue_public/include/control_plane.h @@ -6,7 +6,7 @@ #include #include -#include +#include #include diff --git a/src/client/query/client.cpp b/src/client/query/client.cpp index 8f897a77254..5c3b842964f 100644 --- a/src/client/query/client.cpp +++ b/src/client/query/client.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include namespace NYdb::NQuery { diff --git a/src/client/query/impl/client_session.h b/src/client/query/impl/client_session.h index d4f31ef4adb..4400c30d3b3 100644 --- a/src/client/query/impl/client_session.h +++ b/src/client/query/impl/client_session.h @@ -3,7 +3,7 @@ #include #include -#include +#include namespace NYdb::NQuery { diff --git a/src/client/query/impl/exec_query.cpp b/src/client/query/impl/exec_query.cpp index bab443947c7..63dcf24a3cf 100644 --- a/src/client/query/impl/exec_query.cpp +++ b/src/client/query/impl/exec_query.cpp @@ -9,7 +9,7 @@ #include -#include +#include namespace NYdb::NQuery { diff --git a/src/client/query/query.cpp b/src/client/query/query.cpp index 31abc4ddb7e..971d33014c0 100644 --- a/src/client/query/query.cpp +++ b/src/client/query/query.cpp @@ -1,6 +1,6 @@ #include -#include +#include namespace NYdb::NQuery { diff --git a/src/client/query/stats.cpp b/src/client/query/stats.cpp index 181c92c7a7e..5764c39e3a1 100644 --- a/src/client/query/stats.cpp +++ b/src/client/query/stats.cpp @@ -2,7 +2,7 @@ #include -#include +#include #include diff --git a/src/client/rate_limiter/rate_limiter.cpp b/src/client/rate_limiter/rate_limiter.cpp index 6059b27b0ae..d790a4cf567 100644 --- a/src/client/rate_limiter/rate_limiter.cpp +++ b/src/client/rate_limiter/rate_limiter.cpp @@ -4,7 +4,7 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include +#include #include namespace NYdb::NRateLimiter { diff --git a/src/client/result/result.cpp b/src/client/result/result.cpp index a2b6fb55568..4f52c549325 100644 --- a/src/client/result/result.cpp +++ b/src/client/result/result.cpp @@ -2,8 +2,8 @@ #include -#include -#include +#include +#include #include diff --git a/src/client/scheme/scheme.cpp b/src/client/scheme/scheme.cpp index 07c1b384a3f..bffe90cc0ae 100644 --- a/src/client/scheme/scheme.cpp +++ b/src/client/scheme/scheme.cpp @@ -5,8 +5,8 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include -#include +#include +#include #include #include diff --git a/src/client/ss_tasks/task.cpp b/src/client/ss_tasks/task.cpp index 3dcf6d23793..39216d228ef 100644 --- a/src/client/ss_tasks/task.cpp +++ b/src/client/ss_tasks/task.cpp @@ -1,7 +1,7 @@ #include "task.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/client/table/impl/client_session.h b/src/client/table/impl/client_session.h index 007ad020e0c..3de2f03211e 100644 --- a/src/client/table/impl/client_session.h +++ b/src/client/table/impl/client_session.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include diff --git a/src/client/table/impl/data_query.h b/src/client/table/impl/data_query.h index a3c1b0bcd77..2c2ec5b9237 100644 --- a/src/client/table/impl/data_query.h +++ b/src/client/table/impl/data_query.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include diff --git a/src/client/table/impl/readers.h b/src/client/table/impl/readers.h index 9c44b4a45d8..cba8c674b1e 100644 --- a/src/client/table/impl/readers.h +++ b/src/client/table/impl/readers.h @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/src/client/table/impl/table_client.h b/src/client/table/impl/table_client.h index 167449a2d60..c44d907dd16 100644 --- a/src/client/table/impl/table_client.h +++ b/src/client/table/impl/table_client.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "client_session.h" #include "data_query.h" diff --git a/src/client/table/table.cpp b/src/client/table/table.cpp index 03f5a3bc0d8..ec6d575c2e6 100644 --- a/src/client/table/table.cpp +++ b/src/client/table/table.cpp @@ -9,8 +9,8 @@ #include #undef INCLUDE_YDB_INTERNAL_H -#include -#include +#include +#include #include #include #include diff --git a/src/client/topic/impl/read_session_impl.h b/src/client/topic/impl/read_session_impl.h index 9679154c71f..b7464cae4c0 100644 --- a/src/client/topic/impl/read_session_impl.h +++ b/src/client/topic/impl/read_session_impl.h @@ -13,8 +13,8 @@ #include -#include -#include +#include +#include #include diff --git a/src/client/topic/impl/topic_impl.h b/src/client/topic/impl/topic_impl.h index 5c4e594ce01..b7a83dd6868 100644 --- a/src/client/topic/impl/topic_impl.h +++ b/src/client/topic/impl/topic_impl.h @@ -9,7 +9,7 @@ #include #include -#include +#include namespace NYdb::NTopic { struct TOffsetsRange { diff --git a/src/client/topic/impl/write_session_impl.cpp b/src/client/topic/impl/write_session_impl.cpp index 39654875b34..b0a37ef6b58 100644 --- a/src/client/topic/impl/write_session_impl.cpp +++ b/src/client/topic/impl/write_session_impl.cpp @@ -16,7 +16,7 @@ namespace NYdb::NTopic { const TDuration UPDATE_TOKEN_PERIOD = TDuration::Hours(1); -// Error code from file ydb/public/api/protos/persqueue_error_codes_v1.proto +// Error code from file src/api/protos/persqueue_error_codes_v1.proto const uint64_t WRITE_ERROR_PARTITION_INACTIVE = 500029; namespace { diff --git a/src/client/topic/ut/describe_topic_ut.cpp b/src/client/topic/ut/describe_topic_ut.cpp index 5124949e9a2..938c59d4411 100644 --- a/src/client/topic/ut/describe_topic_ut.cpp +++ b/src/client/topic/ut/describe_topic_ut.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/client/types/credentials/login/login.cpp b/src/client/types/credentials/login/login.cpp index 013b4b52b76..c66ec3052b9 100644 --- a/src/client/types/credentials/login/login.cpp +++ b/src/client/types/credentials/login/login.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include diff --git a/src/client/types/operation/operation.cpp b/src/client/types/operation/operation.cpp index c09ebf6cd68..92847a087a7 100644 --- a/src/client/types/operation/operation.cpp +++ b/src/client/types/operation/operation.cpp @@ -5,7 +5,7 @@ #include -#include +#include namespace NYdb { diff --git a/src/client/value/value.cpp b/src/client/value/value.cpp index 780bb533632..5ab92492277 100644 --- a/src/client/value/value.cpp +++ b/src/client/value/value.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include diff --git a/src/library/proto_output/proto_output.cpp b/src/library/proto_output/proto_output.cpp index 80863fefa6d..a8c4cf3eb09 100644 --- a/src/library/proto_output/proto_output.cpp +++ b/src/library/proto_output/proto_output.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include diff --git a/src/library/yql_common/issue/yql_issue_message.cpp b/src/library/yql_common/issue/yql_issue_message.cpp index 512cd825749..d9b8a5c5ded 100644 --- a/src/library/yql_common/issue/yql_issue_message.cpp +++ b/src/library/yql_common/issue/yql_issue_message.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/tests/unit/client/coordination/coordination_ut.cpp b/tests/unit/client/coordination/coordination_ut.cpp index 6867d679838..75a8dcb1b1c 100644 --- a/tests/unit/client/coordination/coordination_ut.cpp +++ b/tests/unit/client/coordination/coordination_ut.cpp @@ -2,8 +2,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/tests/unit/client/discovery_mutator/discovery_mutator_ut.cpp b/tests/unit/client/discovery_mutator/discovery_mutator_ut.cpp index 12061641d77..993eb390842 100644 --- a/tests/unit/client/discovery_mutator/discovery_mutator_ut.cpp +++ b/tests/unit/client/discovery_mutator/discovery_mutator_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/tests/unit/client/driver/driver_ut.cpp b/tests/unit/client/driver/driver_ut.cpp index 803ed512e01..46154caec7f 100644 --- a/tests/unit/client/driver/driver_ut.cpp +++ b/tests/unit/client/driver/driver_ut.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tests/unit/client/result/result_ut.cpp b/tests/unit/client/result/result_ut.cpp index 5fef90a4832..ec92ffe3f3b 100644 --- a/tests/unit/client/result/result_ut.cpp +++ b/tests/unit/client/result/result_ut.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include diff --git a/tests/unit/client/scripting/ydb_scripting_response_headers_ut.cpp b/tests/unit/client/scripting/ydb_scripting_response_headers_ut.cpp index 36a2099cb0e..ea614c7cf5f 100644 --- a/tests/unit/client/scripting/ydb_scripting_response_headers_ut.cpp +++ b/tests/unit/client/scripting/ydb_scripting_response_headers_ut.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tests/unit/client/value/value_ut.cpp b/tests/unit/client/value/value_ut.cpp index 41d26ec3f75..195448178a2 100644 --- a/tests/unit/client/value/value_ut.cpp +++ b/tests/unit/client/value/value_ut.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/unit/library/yql_common/issue/yql_issue_ut.cpp b/tests/unit/library/yql_common/issue/yql_issue_ut.cpp index 3f078ec75f1..8fd87bb1c59 100644 --- a/tests/unit/library/yql_common/issue/yql_issue_ut.cpp +++ b/tests/unit/library/yql_common/issue/yql_issue_ut.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include