You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-5198 This patch enables RowStorage to dump data on disk
using startNewGeneration if there is 50 Megs left free
This commit is contained in:
@ -1666,6 +1666,8 @@ void RowAggStorage::dump()
|
||||
if (!fEnabledDiskAggregation)
|
||||
return;
|
||||
|
||||
constexpr const int freeMemLimit = 50ULL * 1024ULL * 1024ULL;
|
||||
|
||||
const int64_t leaveFree = fNumOfInputRGPerThread * fRowGroupOut->getRowSize() * getBucketSize();
|
||||
uint64_t freeAttempts{0};
|
||||
int64_t freeMem = 0;
|
||||
@ -1698,6 +1700,10 @@ void RowAggStorage::dump()
|
||||
{
|
||||
startNewGeneration();
|
||||
}
|
||||
else if (fAllowGenerations && fMM->getFree() < freeMemLimit)
|
||||
{
|
||||
startNewGeneration();
|
||||
}
|
||||
else if (!fAllowGenerations && freeMem < 0 && freeAttempts == 1)
|
||||
{
|
||||
// safety guard so aggregation couldn't eat all available memory
|
||||
|
Reference in New Issue
Block a user