Skip to content
Snippets Groups Projects
Commit e1de4164 authored by Mergen Imeev's avatar Mergen Imeev Committed by Alexander Turenko
Browse files

config: sql section for instance config

This section describes the instance SQL configuration.

Part of #8778

NO_DOC=will be added later
NO_CHANGELOG=will be added later
parent ba3194ab
No related branches found
No related tags found
No related merge requests found
......@@ -354,6 +354,13 @@ return schema.new('instance_config', schema.record({
default = false,
}),
}),
sql = schema.record({
cache_size = schema.scalar({
type = 'integer',
box_cfg = 'sql_cache_size',
default = 5 * 1024 * 1024,
}),
}),
}, {
-- Any configuration data should contain a version of the
-- config schema for which it is written.
......
......@@ -266,3 +266,19 @@ g.test_database = function()
local res = instance_config:apply_default({}).database
t.assert_equals(res, exp)
end
g.test_sql = function()
local iconfig = {
sql = {
cache_size = 1,
},
}
instance_config:validate(iconfig)
validate_fields(iconfig.sql, instance_config.schema.fields.sql)
local exp = {
cache_size = 5242880,
}
local res = instance_config:apply_default({}).sql
t.assert_equals(res, exp)
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment