Skip to content

Commit

Permalink
fix corner case for memory prediction (ydb-platform#4856)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 authored and zverevgeny committed Jun 18, 2024
1 parent 77c5a19 commit 9cab448
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ui64 TSpecialReadContext::GetMemoryForSources(const THashMap<ui32, std::shared_p
for (auto&& i : sources) {
auto fetchingPlan = GetColumnsFetchingPlan(i.second);
AFL_VERIFY(i.second->GetIntervalsCount());
const ui64 sourceMemory = fetchingPlan->PredictRawBytes(i.second) / i.second->GetIntervalsCount();
const ui64 sourceMemory = std::max<ui64>(1, fetchingPlan->PredictRawBytes(i.second) / i.second->GetIntervalsCount());
if (!i.second->IsSourceInMemory()) {
hasSequentialReadSources = true;
}
Expand Down

0 comments on commit 9cab448

Please sign in to comment.