Skip to content

Commit

Permalink
Merge b81d863 into e08ae5d
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius authored Apr 1, 2024
2 parents e08ae5d + b81d863 commit a0a2a5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ydb/library/yql/providers/dq/common/yql_dq_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ TDqConfiguration::TDqConfiguration() {
EnableDqReplicate = true;
}
});

REGISTER_SETTING(*this, _MaxAttachmentsSize);
}

} // namespace NYql
4 changes: 3 additions & 1 deletion ydb/library/yql/providers/dq/common/yql_dq_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct TDqSettings {
static constexpr ESpillingEngine SpillingEngine = ESpillingEngine::Disable;
static constexpr ui32 CostBasedOptimizationLevel = 0;
static constexpr ui32 MaxDPccpDPTableSize = 16400U;

static constexpr ui64 MaxAttachmentsSize = 2_GB;
};

using TPtr = std::shared_ptr<TDqSettings>;
Expand Down Expand Up @@ -130,6 +130,8 @@ struct TDqSettings {
NCommon::TConfSetting<bool, false> DisableLLVMForBlockStages;
NCommon::TConfSetting<bool, false> SplitStageOnDqReplicate;

NCommon::TConfSetting<ui64, false> _MaxAttachmentsSize;

// This options will be passed to executor_actor and worker_actor
template <typename TProtoConfig>
void Save(TProtoConfig& config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters
sizeSum += f.GetSize();
}

i64 dataLimit = static_cast<i64>(4_GB);
i64 dataLimit = static_cast<i64>(State->Settings->_MaxAttachmentsSize.Get().GetOrElse(TDqSettings::TDefault::MaxAttachmentsSize));
if (sizeSum > dataLimit) {
YQL_CLOG(WARN, ProviderDq) << "Too much data: " << sizeSum << " > " << dataLimit;
fallbackFlag = true;
Expand Down

0 comments on commit a0a2a5a

Please sign in to comment.