You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5021 Add an option in Columnstore.xml, fastdelete (disabled
by default), which when enabled, indiscriminately invalidates all column extents and performs the actual DELETE only on the AUX column. The trade-off with this approach would now be that the first SELECT for certain query patterns (those containing a WHERE predicate) after the DELETE operation will slow down as the invalidated column extent would need to be scanned again to set the min/max values.
This commit is contained in:
@ -68,6 +68,7 @@ unsigned Config::m_FilesPerColumnPartition = DEFAULT_FILES_PER_COLUMN_PARTITION;
|
||||
unsigned Config::m_ExtentsPerSegmentFile = DEFAULT_EXTENTS_PER_SEGMENT_FILE;
|
||||
int Config::m_BulkProcessPriority = DEFAULT_BULK_PROCESS_PRIORITY;
|
||||
string Config::m_BulkRollbackDir;
|
||||
bool Config::m_FastDelete;
|
||||
unsigned Config::m_MaxFileSystemDiskUsage = DEFAULT_MAX_FILESYSTEM_DISK_USAGE;
|
||||
unsigned Config::m_NumCompressedPadBlks = DEFAULT_COMPRESSED_PADDING_BLKS;
|
||||
bool Config::m_ParentOAMModuleFlag = DEFAULT_PARENT_OAM;
|
||||
@ -185,6 +186,17 @@ void Config::checkReload()
|
||||
m_BulkRollbackDir += "/rollback";
|
||||
}
|
||||
|
||||
const std::string fastDeleteTemp = cf->getConfig("WriteEngine", "FastDelete");
|
||||
|
||||
if (fastDeleteTemp.length() == 0 || boost::iequals(fastDeleteTemp, "false"))
|
||||
{
|
||||
m_FastDelete = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_FastDelete = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Initialize max disk usage
|
||||
//--------------------------------------------------------------------------
|
||||
@ -516,6 +528,20 @@ std::string Config::getBulkRollbackDir()
|
||||
return m_BulkRollbackDir;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* DESCRIPTION:
|
||||
* Get the fast delete option
|
||||
* PARAMETERS:
|
||||
* none
|
||||
******************************************************************************/
|
||||
bool Config::getFastDelete()
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fCacheLock);
|
||||
checkReload();
|
||||
|
||||
return m_FastDelete;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* DESCRIPTION:
|
||||
* Get Max percentage of allowable file system disk usage for each DBRoot
|
||||
|
@ -122,6 +122,14 @@ class Config
|
||||
*/
|
||||
EXPORT static std::string getBulkRollbackDir();
|
||||
|
||||
/**
|
||||
* @brief MCOL-5021 Option to enable/disable fast deletes.
|
||||
* When enabled (option is disabled by default),
|
||||
* all column extents are indiscriminately invalidated
|
||||
* and actual delete is only performed on the AUX column.
|
||||
*/
|
||||
EXPORT static bool getFastDelete();
|
||||
|
||||
/**
|
||||
* @brief Max percentage of allowable file system disk usage for each DBRoot
|
||||
*/
|
||||
@ -187,6 +195,7 @@ class Config
|
||||
static unsigned m_ExtentsPerSegmentFile; // # extents per segment file
|
||||
static int m_BulkProcessPriority; // cpimport.bin proc priority
|
||||
static std::string m_BulkRollbackDir; // bulk rollback meta data dir
|
||||
static bool m_FastDelete; // fast delete option
|
||||
static unsigned m_MaxFileSystemDiskUsage; // max file system % disk usage
|
||||
static unsigned m_NumCompressedPadBlks; // num blks to pad comp chunks
|
||||
static bool m_ParentOAMModuleFlag; // are we running on parent PM
|
||||
|
Reference in New Issue
Block a user