Skip to content
Snippets Groups Projects
Commit c8b2c02d authored by Dmitry E. Oboukhov's avatar Dmitry E. Oboukhov
Browse files

check if snapshot_count has valid value. closes #540

parent fcc02b66
No related branches found
No related tags found
No related merge requests found
......@@ -239,6 +239,10 @@ do
end,
set_snapshot_count = function(snapshot_count)
if math.floor(snapshot_count) ~= snapshot_count then
box.error(box.error.PROC_LUA,
"snapshot_count must be integer")
end
local daemon = box.internal[PREFIX] or daemon
log.info("new snapshot count is %s", tostring(snapshot_count))
......
......@@ -112,3 +112,7 @@ PERIOD
---
- 0.03
...
box.cfg{ snapshot_count = .2 }
---
- error: snapshot_count must be integer
...
......@@ -70,3 +70,5 @@ box.cfg{snapshot_period = 3600 * 4, snapshot_count = 4 }
space:drop()
PERIOD
box.cfg{ snapshot_count = .2 }
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