summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvshlyaga <[email protected]>2025-11-01 14:32:38 +0300
committervvshlyaga <[email protected]>2025-11-01 15:03:03 +0300
commit61adc23615e78bfeeb68c69ca8381f1ba688a3cc (patch)
treeef8eed5d13a723dc92436067a52cd81373d84701
parentce841fb266cb4120ffbc652b1258b1165021c331 (diff)
YT-25334: add preallocating disk space on PutBlocks
commit_hash:5b25f82a89295b5895d26ada3cbef7137c1604c6
-rw-r--r--yt/yt/client/chunk_client/config.cpp3
-rw-r--r--yt/yt/client/chunk_client/config.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/yt/yt/client/chunk_client/config.cpp b/yt/yt/client/chunk_client/config.cpp
index ef5a44b7664..3434991b04c 100644
--- a/yt/yt/client/chunk_client/config.cpp
+++ b/yt/yt/client/chunk_client/config.cpp
@@ -354,6 +354,9 @@ void TReplicationWriterConfig::Register(TRegistrar registrar)
registrar.Parameter("use_probe_put_blocks", &TThis::UseProbePutBlocks)
.Default(false);
+ registrar.Parameter("preallocate_disk_space", &TThis::PreallocateDiskSpace)
+ .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 6a8897dd08b..56ab3d65611 100644
--- a/yt/yt/client/chunk_client/config.h
+++ b/yt/yt/client/chunk_client/config.h
@@ -378,6 +378,9 @@ struct TReplicationWriterConfig
//! Acquiring resources for putting blocks before invoking PutBlocks.
bool UseProbePutBlocks;
+ //! If |true| data node will preallocate disk space before writing.
+ bool PreallocateDiskSpace;
+
int GetDirectUploadNodeCount();
REGISTER_YSON_STRUCT(TReplicationWriterConfig);