From 92a8e0dcede93a6736f9d62e18200dfc936b0d46 Mon Sep 17 00:00:00 2001
From: Roman Tsisyk <roman@tarantool.org>
Date: Thu, 15 Jun 2017 18:30:57 +0300
Subject: [PATCH] Enable snapshot_daemon by default

Set checkpoint_count = 2, checkpoint_interval = 3600 by default.

vinyl/layout.result is updated because checkpoint_count was changed
from 6 to 2.

Closes #2496
---
 src/box/lua/load_cfg.lua           | 4 ++--
 test/app-tap/init_script.result    | 4 ++--
 test/box/admin.result              | 4 ++--
 test/box/cfg.result                | 8 ++++----
 test/vinyl/layout.result           | 5 +++++
 test/xlog/snapshot_daemon.result   | 3 +++
 test/xlog/snapshot_daemon.test.lua | 1 +
 7 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua
index 5f6f4aaf2f..66790ba77c 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg.lua
@@ -48,8 +48,8 @@ local default_cfg = {
     coredump            = false,
     read_only           = false,
     hot_standby         = false,
-    checkpoint_interval = 0,        -- 0 = disabled
-    checkpoint_count    = 6,
+    checkpoint_interval = 3600,
+    checkpoint_count    = 2,
 }
 
 -- types of available options
diff --git a/test/app-tap/init_script.result b/test/app-tap/init_script.result
index 4921309241..981616036e 100644
--- a/test/app-tap/init_script.result
+++ b/test/app-tap/init_script.result
@@ -4,8 +4,8 @@
 
 box.cfg
 1	background:false
-2	checkpoint_count:6
-3	checkpoint_interval:0
+2	checkpoint_count:2
+3	checkpoint_interval:3600
 4	coredump:false
 5	force_recovery:false
 6	hot_standby:false
diff --git a/test/box/admin.result b/test/box/admin.result
index 7f166782ba..bda03bb63c 100644
--- a/test/box/admin.result
+++ b/test/box/admin.result
@@ -21,9 +21,9 @@ cfg_filter(box.cfg)
 - - - background
     - false
   - - checkpoint_count
-    - 6
+    - 2
   - - checkpoint_interval
-    - 0
+    - 3600
   - - coredump
     - false
   - - force_recovery
diff --git a/test/box/cfg.result b/test/box/cfg.result
index 8bd25f972f..9392c32420 100644
--- a/test/box/cfg.result
+++ b/test/box/cfg.result
@@ -17,9 +17,9 @@ cfg_filter(box.cfg)
 - - - background
     - false
   - - checkpoint_count
-    - 6
+    - 2
   - - checkpoint_interval
-    - 0
+    - 3600
   - - coredump
     - false
   - - force_recovery
@@ -94,9 +94,9 @@ cfg_filter(box.cfg)
 - - - background
     - false
   - - checkpoint_count
-    - 6
+    - 2
   - - checkpoint_interval
-    - 0
+    - 3600
   - - coredump
     - false
   - - force_recovery
diff --git a/test/vinyl/layout.result b/test/vinyl/layout.result
index 2c61f7a954..3b9d836f5b 100644
--- a/test/vinyl/layout.result
+++ b/test/vinyl/layout.result
@@ -150,6 +150,11 @@ result
           type: INSERT
         BODY:
           tuple: [11, {}]
+      - HEADER:
+          timestamp: <timestamp>
+          type: INSERT
+        BODY:
+          tuple: [7, {2: 1}]
       - HEADER:
           timestamp: <timestamp>
           type: INSERT
diff --git a/test/xlog/snapshot_daemon.result b/test/xlog/snapshot_daemon.result
index 669910ab3c..4555a14ed4 100644
--- a/test/xlog/snapshot_daemon.result
+++ b/test/xlog/snapshot_daemon.result
@@ -16,6 +16,9 @@ test_run = env.new()
 test_run:cleanup_cluster()
 ---
 ...
+box.cfg{checkpoint_interval = 0}
+---
+...
 PERIOD = 0.03
 ---
 ...
diff --git a/test/xlog/snapshot_daemon.test.lua b/test/xlog/snapshot_daemon.test.lua
index 732ac756d0..59337e5030 100644
--- a/test/xlog/snapshot_daemon.test.lua
+++ b/test/xlog/snapshot_daemon.test.lua
@@ -6,6 +6,7 @@ test_run = env.new()
 
 test_run:cleanup_cluster()
 
+box.cfg{checkpoint_interval = 0}
 
 PERIOD = 0.03
 if jit.os ~= 'Linux' then PERIOD = 1.5 end
-- 
GitLab