aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.com>2023-12-04 16:38:47 +0300
committerermolovd <ermolovd@yandex-team.com>2023-12-05 03:37:37 +0300
commita11791dcf30ed13453ba7e694e48baaca59498e7 (patch)
tree69d501fd2488e675ec8d675600f8d0fbd3e8abff
parente788a124bc5445efa037f4b2a45269b4f138bc39 (diff)
downloadydb-a11791dcf30ed13453ba7e694e48baaca59498e7.tar.gz
Increase timeout to decrease test flaps
-rw-r--r--yt/cpp/mapreduce/client/operation_preparer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt/cpp/mapreduce/client/operation_preparer.cpp b/yt/cpp/mapreduce/client/operation_preparer.cpp
index c995c2878e..eb30eed000 100644
--- a/yt/cpp/mapreduce/client/operation_preparer.cpp
+++ b/yt/cpp/mapreduce/client/operation_preparer.cpp
@@ -578,9 +578,10 @@ TMaybe<TString> TJobPreparer::GetItemFromCypressCache(const TString& md5Signatur
TDuration TJobPreparer::GetWaitForUploadTimeout(const IItemToUpload& itemToUpload) const
{
- const TDuration extraTime = OperationPreparer_.GetContext().Config->WaitLockPollInterval +
+ TDuration extraTime = OperationPreparer_.GetContext().Config->WaitLockPollInterval +
TDuration::MilliSeconds(100);
- const double dataSizeGb = static_cast<double>(itemToUpload.GetDataSize()) / 1_GB;
+ auto dataSizeGb = (itemToUpload.GetDataSize() + 1_GB - 1) / 1_GB;
+ dataSizeGb = Max<ui64>(dataSizeGb, 1);
return extraTime + dataSizeGb * OperationPreparer_.GetContext().Config->CacheLockTimeoutPerGb;
}