diff --git a/Documentation/Routers/Avrorouter.md b/Documentation/Routers/Avrorouter.md index ebce9e5de..ed3d4e2a8 100644 --- a/Documentation/Routers/Avrorouter.md +++ b/Documentation/Routers/Avrorouter.md @@ -174,7 +174,11 @@ data block. The default value is 1000 row events. #### `block_size` The Avro data block size in bytes. The default is 16 kilobytes. Increase this -value if individual events in the binary logs are very large. +value if individual events in the binary logs are very large. The value is a +size type parameter which means that it can also be defined with an SI +suffix. Refer to the +[Configuration Guide](../Getting-Started/Configuration-Guide.md) for more +details about size type parameters and how to use them. ## Module commands diff --git a/server/modules/routing/avrorouter/avro.c b/server/modules/routing/avrorouter/avro.c index 70e4931e3..2c6125da7 100644 --- a/server/modules/routing/avrorouter/avro.c +++ b/server/modules/routing/avrorouter/avro.c @@ -201,7 +201,7 @@ MXS_MODULE* MXS_CREATE_MODULE() {"group_rows", MXS_MODULE_PARAM_COUNT, "1000"}, {"group_trx", MXS_MODULE_PARAM_COUNT, "1"}, {"start_index", MXS_MODULE_PARAM_COUNT, "1"}, - {"block_size", MXS_MODULE_PARAM_COUNT, "0"}, + {"block_size", MXS_MODULE_PARAM_SIZE, "0"}, {"codec", MXS_MODULE_PARAM_ENUM, "null", MXS_MODULE_OPT_ENUM_UNIQUE, codec_values}, {MXS_END_MODULE_PARAMS} } @@ -425,7 +425,7 @@ createInstance(SERVICE *service, char **options) inst->trx_target = config_get_integer(params, "group_trx"); inst->codec = config_get_enum(params, "codec", codec_values); int first_file = config_get_integer(params, "start_index"); - inst->block_size = config_get_integer(params, "block_size"); + inst->block_size = config_get_size(params, "block_size"); MXS_CONFIG_PARAMETER *param = config_get_param(params, "source"); inst->gtid.domain = 0;