diff options
author | akozhikhov <akozhikhov@yandex-team.com> | 2024-08-23 22:58:16 +0300 |
---|---|---|
committer | akozhikhov <akozhikhov@yandex-team.com> | 2024-08-23 23:07:53 +0300 |
commit | e16cdb6f13694f93a80dd6b295538a30de09b96c (patch) | |
tree | d41561cb8f25005783be51d1a88495cd0f378e15 | |
parent | 9807aa77059e143000008b10df716fa15a8b1d0a (diff) | |
download | ydb-e16cdb6f13694f93a80dd6b295538a30de09b96c.tar.gz |
YT-15939: Chaos replication collocation options
e84a94c1998096fe46ef543149e962be083af035
-rw-r--r-- | yt/yt/client/api/rpc_proxy/client_impl.cpp | 3 | ||||
-rw-r--r-- | yt/yt/client/api/table_client.h | 1 | ||||
-rw-r--r-- | yt/yt/client/driver/chaos_commands.cpp | 6 | ||||
-rw-r--r-- | yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp index 567505e05f..346a2c875f 100644 --- a/yt/yt/client/api/rpc_proxy/client_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp @@ -737,6 +737,9 @@ TFuture<void> TClient::AlterReplicationCard( if (options.ReplicationCardCollocationId) { ToProto(req->mutable_replication_card_collocation_id(), *options.ReplicationCardCollocationId); } + if (options.CollocationOptions) { + req->set_collocation_options(ConvertToYsonString(options.CollocationOptions).ToString()); + } return req->Invoke().As<void>(); } diff --git a/yt/yt/client/api/table_client.h b/yt/yt/client/api/table_client.h index f4d959e94d..f577d4a4b4 100644 --- a/yt/yt/client/api/table_client.h +++ b/yt/yt/client/api/table_client.h @@ -278,6 +278,7 @@ struct TAlterReplicationCardOptions NTabletClient::TReplicatedTableOptionsPtr ReplicatedTableOptions; std::optional<bool> EnableReplicatedTableTracker; std::optional<NChaosClient::TReplicationCardCollocationId> ReplicationCardCollocationId; + NTabletClient::TReplicationCollocationOptionsPtr CollocationOptions; }; struct TGetReplicationCardOptions diff --git a/yt/yt/client/driver/chaos_commands.cpp b/yt/yt/client/driver/chaos_commands.cpp index 4012dadedb..72b67dc19d 100644 --- a/yt/yt/client/driver/chaos_commands.cpp +++ b/yt/yt/client/driver/chaos_commands.cpp @@ -64,6 +64,12 @@ void TAlterReplicationCardCommand::Register(TRegistrar registrar) return command->Options.ReplicationCardCollocationId; }) .Optional(/*init*/ false); + registrar.ParameterWithUniversalAccessor<NTabletClient::TReplicationCollocationOptionsPtr>( + "collocation_options", + [] (TThis* command) -> auto& { + return command->Options.CollocationOptions; + }) + .Optional(/*init*/ false); } void TAlterReplicationCardCommand::DoExecute(ICommandContextPtr context) 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 d43f4a22ca..7b41d98386 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 @@ -2001,6 +2001,7 @@ message TReqAlterReplicationCard optional bytes replicated_table_options = 2; // YSON optional bool enable_replicated_table_tracker = 3; optional NYT.NProto.TGuid replication_card_collocation_id = 4; + optional bytes collocation_options = 5; // NTabletClient::TReplicationCollocationOptions optional TMutatingOptions mutating_options = 100; } |