MXS-2304 Use get_size() instead of config_get_size()

This commit is contained in:
Esa Korhonen
2019-01-31 16:09:59 +02:00
parent b357717149
commit 882d360355
7 changed files with 24 additions and 27 deletions

View File

@ -348,11 +348,11 @@ bool CacheFilter::process_params(MXS_CONFIG_PARAMETER* ppParams, CACHE_CONFIG& c
config.debug = ppParams->get_integer("debug");
config.hard_ttl = ppParams->get_integer("hard_ttl");
config.soft_ttl = ppParams->get_integer("soft_ttl");
config.max_size = config_get_size(ppParams, "max_size");
config.max_size = ppParams->get_size("max_size");
config.max_count = ppParams->get_integer("max_count");
config.storage = MXS_STRDUP(config_get_string(ppParams, "storage"));
config.max_resultset_rows = ppParams->get_integer("max_resultset_rows");
config.max_resultset_size = config_get_size(ppParams, "max_resultset_size");
config.max_resultset_size = ppParams->get_size("max_resultset_size");
config.thread_model = static_cast<cache_thread_model_t>(ppParams->get_enum("cached_data",
parameter_cached_data_values));
config.selects = static_cast<cache_selects_t>(ppParams->get_enum("selects",

View File

@ -234,8 +234,7 @@ static MXS_FILTER* createInstance(const char* name, MXS_CONFIG_PARAMETER* params
{
cinstance->name = name;
cinstance->config.max_resultset_rows = params->get_integer("max_resultset_rows");
cinstance->config.max_resultset_size = config_get_size(params,
"max_resultset_size");
cinstance->config.max_resultset_size = params->get_size("max_resultset_size");
cinstance->config.m_return =
static_cast<maxrows_return_mode>(params->get_enum("max_resultset_return",
return_option_values));

View File

@ -60,7 +60,7 @@ static bool conversion_task_ctl(Avro* inst, bool start);
*/
MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params)
{
uint64_t block_size = config_get_size(service->svc_config_param, "block_size");
uint64_t block_size = service->svc_config_param->get_size("block_size");
mxs_avro_codec_type codec = static_cast<mxs_avro_codec_type>(
service->svc_config_param->get_enum("codec", codec_values));
std::string avrodir = config_get_string(service->svc_config_param, "avrodir");

View File

@ -343,7 +343,7 @@ static MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params
inst->short_burst = params->get_integer("shortburst");
inst->long_burst = params->get_integer("longburst");
inst->burst_size = config_get_size(params, "burstsize");
inst->burst_size = params->get_size("burstsize");
inst->binlogdir = config_copy_string(params, "binlogdir");
inst->heartbeat = params->get_integer("heartbeat");
inst->retry_interval = params->get_integer("connect_retry");

View File

@ -157,7 +157,7 @@ struct Config
, delayed_retry(params->get_bool("delayed_retry"))
, delayed_retry_timeout(params->get_integer("delayed_retry_timeout"))
, transaction_replay(params->get_bool("transaction_replay"))
, trx_max_size(config_get_size(params, "transaction_replay_max_size"))
, trx_max_size(params->get_size("transaction_replay_max_size"))
, optimistic_trx(params->get_bool("optimistic_trx"))
{
if (causal_reads)