1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL4841 dev port run large join without OOM

This commit is contained in:
David Hall
2022-02-09 17:33:55 -06:00
parent d30e140dc3
commit 27dea733c5
34 changed files with 821 additions and 518 deletions

View File

@ -884,11 +884,12 @@ void WindowFunctionStep::execute()
{
fInRowGroupData.push_back(rgData);
uint64_t memAdd = fRowGroupIn.getSizeWithStrings() + rowCnt * sizeof(RowPosition);
fMemUsage += memAdd;
if (fRm->getMemory(memAdd, fSessionMemLimit) == false)
throw IDBExcept(ERR_WF_DATA_SET_TOO_BIG);
fMemUsage += memAdd;
for (uint64_t j = 0; j < rowCnt; ++j)
{
if (i > 0x0000FFFFFFFFFFFFULL || j > 0x000000000000FFFFULL)
@ -1012,11 +1013,12 @@ void WindowFunctionStep::doFunction()
while (((i = nextFunctionIndex()) < fFunctionCount) && !cancelled())
{
uint64_t memAdd = fRows.size() * sizeof(RowPosition);
fMemUsage += memAdd;
if (fRm->getMemory(memAdd, fSessionMemLimit) == false)
throw IDBExcept(ERR_WF_DATA_SET_TOO_BIG);
fMemUsage += memAdd;
fFunctions[i]->setCallback(this, i);
(*fFunctions[i].get())();
}