Skip to content

Commit b7405d4

Browse files
akozhikhovblinkov
authored andcommitted
Elect compression dictionary once per multi chunk writer session in compaction
commit_hash:356b41fe9f7f12a3263082a94070464f588b650b
1 parent 5f5fb69 commit b7405d4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

yt/yt/client/table_client/config.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ void TDictionaryCompressionConfig::Register(TRegistrar registrar)
289289
.Default(0.7)
290290
.InRange(0, 1);
291291

292+
registrar.Parameter("elect_random_policy", &TThis::ElectRandomPolicy)
293+
.Default(false)
294+
.DontSerializeDefault();
295+
292296
registrar.Postprocessor([] (TThis* config) {
293297
if (config->DesiredSampleCount > config->MaxProcessedSampleCount) {
294298
THROW_ERROR_EXCEPTION("\"desired_sample_count\" cannot be greater than \"max_processed_sample_count\"");

yt/yt/client/table_client/config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ struct TDictionaryCompressionConfig
251251
//! Upper limit on acceptable compression ratio. No chunk compression is performed if this limit is exceeded.
252252
double MaxAcceptableCompressionRatio;
253253

254+
//! For testing purposes only.
255+
bool ElectRandomPolicy;
256+
254257
REGISTER_YSON_STRUCT(TDictionaryCompressionConfig);
255258

256259
static void Register(TRegistrar registrar);

0 commit comments

Comments
 (0)