1
0
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:
Gagan Goel
2021-07-07 14:01:47 +00:00
parent 866dc25729
commit a0bd790005
8 changed files with 55 additions and 7 deletions

View File

@ -348,6 +348,15 @@ static MYSQL_THDVAR_BOOL(
0
);
static MYSQL_THDVAR_BOOL(
use_cpimport_for_cache_inserts,
PLUGIN_VAR_RQCMDARG,
"Use cpimport for the cache flush into ColumnStore",
NULL,
NULL,
0
);
static MYSQL_THDVAR_ULONGLONG(
cache_flush_threshold,
PLUGIN_VAR_RQCMDARG,
@ -388,6 +397,7 @@ st_mysql_sys_var* mcs_system_variables[] =
MYSQL_SYSVAR(varbin_always_hex),
MYSQL_SYSVAR(replication_slave),
MYSQL_SYSVAR(cache_inserts),
MYSQL_SYSVAR(use_cpimport_for_cache_inserts),
MYSQL_SYSVAR(cache_flush_threshold),
NULL
};
@ -650,6 +660,15 @@ void set_cache_inserts(THD* thd, bool value)
THDVAR(thd, cache_inserts) = value;
}
bool get_use_cpimport_for_cache_inserts(THD* thd)
{
return ( thd == NULL ) ? false : THDVAR(thd, use_cpimport_for_cache_inserts);
}
void set_use_cpimport_for_cache_inserts(THD* thd, bool value)
{
THDVAR(thd, use_cpimport_for_cache_inserts) = value;
}
ulonglong get_cache_flush_threshold(THD* thd)
{
return ( thd == NULL ) ? 500000 : THDVAR(thd, cache_flush_threshold);