You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
ColumnStore Cache changes.
1. Add a new system variable, columnstore_use_cpimport_for_cache_inserts, that when set to ON, uses cpimport for the cache flush into ColumnStore. This variable is set to OFF by default. By default, we perform batch inserts for the cache flush. 2. Disable DMLProc logging of the SQL statement text for the cache flush operation in case of batch inserts. Under certain heavy loads involving INSERT statements, this logging becomes a bottleneck for the cache flush, causing subsequent inserts into the cache table to hang.
This commit is contained in:
@ -31,7 +31,9 @@ namespace dmlpackage
|
||||
*/
|
||||
|
||||
CalpontDMLPackage::CalpontDMLPackage()
|
||||
: fPlan(new messageqcpp::ByteStream()), fTable(0), fHasFilter(0), fLogging(true), fIsInsertSelect(false), fIsBatchInsert(false), fIsAutocommitOn(false), fTableOid(0)
|
||||
: fPlan(new messageqcpp::ByteStream()),
|
||||
fTable(0), fHasFilter(0), fLogging(true), fIsInsertSelect(false),
|
||||
fIsBatchInsert(false), fIsCacheInsert(false), fIsAutocommitOn(false), fIsWarnToError(false), fTableOid(0)
|
||||
{
|
||||
|
||||
}
|
||||
@ -40,7 +42,7 @@ CalpontDMLPackage::CalpontDMLPackage( std::string schemaName, std::string tableN
|
||||
std::string dmlStatement, int sessionID )
|
||||
: fSchemaName(schemaName), fTableName( tableName ), fDMLStatement( dmlStatement ),
|
||||
fSessionID(sessionID), fPlan(new messageqcpp::ByteStream()), fTable(0), fHasFilter(false), fLogging(true), fIsInsertSelect(false),
|
||||
fIsBatchInsert(false), fIsAutocommitOn(false), fIsWarnToError(false), fTableOid(0)
|
||||
fIsBatchInsert(false), fIsCacheInsert(false), fIsAutocommitOn(false), fIsWarnToError(false), fTableOid(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -320,6 +320,15 @@ public:
|
||||
fIsBatchInsert = isBatchInsert;
|
||||
}
|
||||
|
||||
bool get_isCacheInsert()
|
||||
{
|
||||
return fIsCacheInsert;
|
||||
}
|
||||
void set_isCacheInsert( const bool isCacheInsert )
|
||||
{
|
||||
fIsCacheInsert = isCacheInsert;
|
||||
}
|
||||
|
||||
bool get_isAutocommitOn()
|
||||
{
|
||||
return fIsAutocommitOn;
|
||||
@ -378,6 +387,7 @@ protected:
|
||||
std::string StripLeadingWhitespace( std::string value );
|
||||
bool fIsInsertSelect;
|
||||
bool fIsBatchInsert;
|
||||
bool fIsCacheInsert;
|
||||
bool fIsAutocommitOn;
|
||||
bool fIsWarnToError;
|
||||
uint32_t fTableOid;
|
||||
|
@ -69,6 +69,7 @@ int InsertDMLPackage::write(messageqcpp::ByteStream& bytestream)
|
||||
bytestream << fTableOid;
|
||||
bytestream << static_cast<messageqcpp::ByteStream::byte>(fIsInsertSelect);
|
||||
bytestream << static_cast<messageqcpp::ByteStream::byte>(fIsBatchInsert);
|
||||
bytestream << static_cast<messageqcpp::ByteStream::byte>(fIsCacheInsert);
|
||||
bytestream << static_cast<messageqcpp::ByteStream::byte>(fIsAutocommitOn);
|
||||
|
||||
if (fTable != 0)
|
||||
@ -103,6 +104,7 @@ int InsertDMLPackage::read(messageqcpp::ByteStream& bytestream)
|
||||
bytestream >> fTableOid;
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsInsertSelect);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsBatchInsert);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsCacheInsert);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsAutocommitOn);
|
||||
|
||||
fTable = new DMLTable();
|
||||
@ -132,6 +134,7 @@ void InsertDMLPackage::readMetaData(messageqcpp::ByteStream& bytestream)
|
||||
bytestream >> fTableOid;
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsInsertSelect);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsBatchInsert);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsCacheInsert);
|
||||
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsAutocommitOn);
|
||||
|
||||
fTable = new DMLTable();
|
||||
|
Reference in New Issue
Block a user