diff options
author | nadya02 <nadya02@yandex-team.com> | 2023-11-02 15:57:06 +0300 |
---|---|---|
committer | nadya02 <nadya02@yandex-team.com> | 2023-11-02 17:17:23 +0300 |
commit | 341edc016553015076685c0cfefde6df2749e4a1 (patch) | |
tree | ca718263e48372893feed66b7b3c49633937e1b0 | |
parent | 899516dc464fc1e5f2ea8239f425fabac94e33c4 (diff) | |
download | ydb-341edc016553015076685c0cfefde6df2749e4a1.tar.gz |
YT-20315: Add disable cross cell copy
add disable crocc celing
-rw-r--r-- | yt/yt/client/api/cypress_client.h | 1 | ||||
-rw-r--r-- | yt/yt/client/api/rpc_proxy/client_base.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/driver/cypress_commands.cpp | 4 | ||||
-rw-r--r-- | yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto | 2 |
4 files changed, 9 insertions, 0 deletions
diff --git a/yt/yt/client/api/cypress_client.h b/yt/yt/client/api/cypress_client.h index 332a6f44e2..141b02ffb4 100644 --- a/yt/yt/client/api/cypress_client.h +++ b/yt/yt/client/api/cypress_client.h @@ -122,6 +122,7 @@ struct TCopyNodeOptionsBase bool PreserveExpirationTimeout = false; bool PreserveAcl = false; bool PessimisticQuotaCheck = true; + bool EnableCrossCellCopying = true; }; struct TCopyNodeOptions diff --git a/yt/yt/client/api/rpc_proxy/client_base.cpp b/yt/yt/client/api/rpc_proxy/client_base.cpp index b6884472a3..812b6cd843 100644 --- a/yt/yt/client/api/rpc_proxy/client_base.cpp +++ b/yt/yt/client/api/rpc_proxy/client_base.cpp @@ -460,6 +460,7 @@ TFuture<NCypressClient::TNodeId> TClientBase::CopyNode( req->set_preserve_owner(options.PreserveOwner); req->set_preserve_acl(options.PreserveAcl); req->set_pessimistic_quota_check(options.PessimisticQuotaCheck); + req->set_enable_cross_cell_copying(options.EnableCrossCellCopying); ToProto(req->mutable_transactional_options(), options); ToProto(req->mutable_prerequisite_options(), options); @@ -492,6 +493,7 @@ TFuture<NCypressClient::TNodeId> TClientBase::MoveNode( req->set_preserve_expiration_timeout(options.PreserveExpirationTimeout); req->set_preserve_owner(options.PreserveOwner); req->set_pessimistic_quota_check(options.PessimisticQuotaCheck); + req->set_enable_cross_cell_copying(options.EnableCrossCellCopying); ToProto(req->mutable_transactional_options(), options); ToProto(req->mutable_prerequisite_options(), options); diff --git a/yt/yt/client/driver/cypress_commands.cpp b/yt/yt/client/driver/cypress_commands.cpp index 6024244f2c..437762718d 100644 --- a/yt/yt/client/driver/cypress_commands.cpp +++ b/yt/yt/client/driver/cypress_commands.cpp @@ -332,6 +332,8 @@ TCopyCommand::TCopyCommand() .Optional(); RegisterParameter("pessimistic_quota_check", Options.PessimisticQuotaCheck) .Optional(); + RegisterParameter("enable_cross_cell_copying", Options.EnableCrossCellCopying) + .Optional(); } void TCopyCommand::DoExecute(ICommandContextPtr context) @@ -370,6 +372,8 @@ TMoveCommand::TMoveCommand() .Optional(); RegisterParameter("pessimistic_quota_check", Options.PessimisticQuotaCheck) .Optional(); + RegisterParameter("enable_cross_cell_copying", Options.EnableCrossCellCopying) + .Optional(); } void TMoveCommand::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 9cad3e691a..e5ee25c36a 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 @@ -1446,6 +1446,7 @@ message TReqCopyNode optional bool ignore_existing = 8 [default = false]; optional bool lock_existing = 13 [default = false]; optional bool pessimistic_quota_check = 9 [default = true]; + optional bool enable_cross_cell_copying = 15 [default = true]; optional TTransactionalOptions transactional_options = 100; optional TPrerequisiteOptions prerequisite_options = 101; @@ -1473,6 +1474,7 @@ message TReqMoveNode optional bool preserve_expiration_timeout = 12 [default = false]; optional bool preserve_owner = 11 [default = false]; optional bool pessimistic_quota_check = 7 [default = true]; + optional bool enable_cross_cell_copying = 13 [default = true]; optional TTransactionalOptions transactional_options = 100; optional TPrerequisiteOptions prerequisite_options = 101; |