You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +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)
|
if (!fEnabledDiskAggregation)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
constexpr const int freeMemLimit = 50ULL * 1024ULL * 1024ULL;
|
||||||
|
|
||||||
const int64_t leaveFree = fNumOfInputRGPerThread * fRowGroupOut->getRowSize() * getBucketSize();
|
const int64_t leaveFree = fNumOfInputRGPerThread * fRowGroupOut->getRowSize() * getBucketSize();
|
||||||
uint64_t freeAttempts{0};
|
uint64_t freeAttempts{0};
|
||||||
int64_t freeMem = 0;
|
int64_t freeMem = 0;
|
||||||
@@ -1698,6 +1700,10 @@ void RowAggStorage::dump()
|
|||||||
{
|
{
|
||||||
startNewGeneration();
|
startNewGeneration();
|
||||||
}
|
}
|
||||||
|
else if (fAllowGenerations && fMM->getFree() < freeMemLimit)
|
||||||
|
{
|
||||||
|
startNewGeneration();
|
||||||
|
}
|
||||||
else if (!fAllowGenerations && freeMem < 0 && freeAttempts == 1)
|
else if (!fAllowGenerations && freeMem < 0 && freeAttempts == 1)
|
||||||
{
|
{
|
||||||
// safety guard so aggregation couldn't eat all available memory
|
// safety guard so aggregation couldn't eat all available memory
|
||||||
|
Reference in New Issue
Block a user