aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvshlyaga <vvshlyaga@yandex-team.com>2025-03-25 14:29:30 +0300
committervvshlyaga <vvshlyaga@yandex-team.com>2025-03-25 14:47:17 +0300
commitfb0706c704e0253cc65a489b324ccec66ef85bf8 (patch)
treec6b121942b4a47de3dda23b5fd29c1441f5dd867
parentfcdb46a2e7615a1b4aa16a4d4b84c3833c942d4c (diff)
downloadydb-fb0706c704e0253cc65a489b324ccec66ef85bf8.tar.gz
YT-24267: add probe put blocks API interface
commit_hash:6c17cb04a6f1f5619cf06502eda433c7588b35d7
-rw-r--r--yt/yt/client/chunk_client/config.cpp5
-rw-r--r--yt/yt/client/chunk_client/config.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/yt/yt/client/chunk_client/config.cpp b/yt/yt/client/chunk_client/config.cpp
index 5d7a05e091..6c367cdafe 100644
--- a/yt/yt/client/chunk_client/config.cpp
+++ b/yt/yt/client/chunk_client/config.cpp
@@ -268,6 +268,8 @@ void TReplicationWriterConfig::Register(TRegistrar registrar)
.DefaultNew();
registrar.Parameter("node_rpc_timeout", &TThis::NodeRpcTimeout)
.Default(TDuration::Seconds(300));
+ registrar.Parameter("probe_put_blocks_timeout", &TThis::ProbePutBlocksTimeout)
+ .Default(TDuration::Seconds(60));
registrar.Parameter("upload_replication_factor", &TThis::UploadReplicationFactor)
.GreaterThanOrEqual(1)
.Default(2);
@@ -301,6 +303,9 @@ void TReplicationWriterConfig::Register(TRegistrar registrar)
registrar.Parameter("enable_local_throttling", &TThis::EnableLocalThrottling)
.Default(false);
+ registrar.Parameter("use_probe_put_blocks", &TThis::UseProbePutBlocks)
+ .Default(false);
+
registrar.Preprocessor([] (TThis* config) {
config->NodeChannel->RetryBackoffTime = TDuration::Seconds(10);
config->NodeChannel->RetryAttempts = 100;
diff --git a/yt/yt/client/chunk_client/config.h b/yt/yt/client/chunk_client/config.h
index d703c2da3a..ad17f5f757 100644
--- a/yt/yt/client/chunk_client/config.h
+++ b/yt/yt/client/chunk_client/config.h
@@ -331,6 +331,8 @@ struct TReplicationWriterConfig
*/
TDuration NodeRpcTimeout;
+ TDuration ProbePutBlocksTimeout;
+
NRpc::TRetryingChannelConfigPtr NodeChannel;
int UploadReplicationFactor;
@@ -366,6 +368,10 @@ struct TReplicationWriterConfig
//! If |true| network throttlers will be applied even in case of requests to local host.
bool EnableLocalThrottling;
+ //! Enable write protocol with probe put blocks.
+ //! Acquiring resources for putting blocks before invoking PutBlocks.
+ bool UseProbePutBlocks;
+
int GetDirectUploadNodeCount();
REGISTER_YSON_STRUCT(TReplicationWriterConfig);