Skip to content

Commit

Permalink
Merge b4533eb into 14ca1e8
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkovalev authored May 7, 2024
2 parents 14ca1e8 + b4533eb commit bca0e59
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions ydb/library/yql/providers/dq/actors/executer_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ class TDqExecuter: public TRichActor<TDqExecuter>, NYql::TCounters {
allocateRequest.Release(),
IEventHandle::FlagTrackDelivery | IEventHandle::FlagSubscribeOnSession));

Timeout = tasks.size() == 1
? TDuration::MilliSeconds(Settings->_LiteralTimeout.Get().GetOrElse(TDqSettings::TDefault::LiteralTimeout))
: TDuration::MilliSeconds(Settings->_TableTimeout.Get().GetOrElse(TDqSettings::TDefault::TableTimeout));
Timeout = TDuration::MilliSeconds(Settings->_Timeout.Get().GetOrElse(TDqSettings::TDefault::TableTimeout));

YQL_CLOG(DEBUG, ProviderDq) << "Dq timeouts are set to: "
<< ToString(Timeout) << " (global), "
Expand Down
1 change: 1 addition & 0 deletions ydb/library/yql/providers/dq/common/yql_dq_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TDqConfiguration::TDqConfiguration() {

REGISTER_SETTING(*this, _LiteralTimeout);
REGISTER_SETTING(*this, _TableTimeout);
REGISTER_SETTING(*this, _Timeout);
REGISTER_SETTING(*this, _LongWorkersAllocationWarnTimeout);
REGISTER_SETTING(*this, _LongWorkersAllocationFailTimeout);

Expand Down
2 changes: 2 additions & 0 deletions ydb/library/yql/providers/dq/common/yql_dq_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ struct TDqSettings {
NCommon::TConfSetting<NSize::TSize, false> MemoryLimit;
NCommon::TConfSetting<ui64, false> _LiteralTimeout;
NCommon::TConfSetting<ui64, false> _TableTimeout;
NCommon::TConfSetting<ui64, false> _Timeout;
NCommon::TConfSetting<ui64, false> _LongWorkersAllocationWarnTimeout;
NCommon::TConfSetting<ui64, false> _LongWorkersAllocationFailTimeout;
NCommon::TConfSetting<bool, false> EnableInsert;
Expand Down Expand Up @@ -160,6 +161,7 @@ struct TDqSettings {
SAVE_SETTING(MemoryLimit);
SAVE_SETTING(_LiteralTimeout);
SAVE_SETTING(_TableTimeout);
SAVE_SETTING(_Timeout);
SAVE_SETTING(_LongWorkersAllocationWarnTimeout);
SAVE_SETTING(_LongWorkersAllocationFailTimeout);
SAVE_SETTING(_AllResultsBytesLimit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters
}

TInstant startTime = TInstant::Now();
State->Settings->_Timeout = State->Settings->_LiteralTimeout.Get().GetOrElse(TDqSettings::TDefault::LiteralTimeout);

try {
auto result = TMaybeNode<TResult>(input).Cast();
Expand Down Expand Up @@ -1264,6 +1265,7 @@ class TDqExecTransformer: public TExecTransformerBase, TCounters
YQL_CLOG(TRACE, ProviderDq) << "HandlePull " << NCommon::ExprToPrettyString(ctx, *input);

TInstant startTime = TInstant::Now();
State->Settings->_Timeout = State->Settings->_TableTimeout.Get().GetOrElse(TDqSettings::TDefault::TableTimeout);
auto pull = TPull(input);

THashMap<TString, TString> pullSettings;
Expand Down

0 comments on commit bca0e59

Please sign in to comment.