* [tarantool-patches] [PATCH] recovery: recount offset on checkpoint_interval change
@ 2018-07-09 14:03 Konstantin Belyavskiy
2018-07-09 14:16 ` [tarantool-patches] " Georgy Kirichenko
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Belyavskiy @ 2018-07-09 14:03 UTC (permalink / raw)
To: tarantool-patches
Next checkpoint time is set by the formula:
period = self.checkpoint_interval + offset,
where offset is defined as follow:
offset = random % self.checkpoint_interval
So offset must be calculated again if at least the new
interval is less than the old one.
Closes #3370
---
Ticket: https://github.com/tarantool/tarantool/issues/3370
Branch: https://github.com/tarantool/tarantool/compare/kbelyavs/gh-3370-fix-bug-with-wrong-snapshot-scheduling
src/box/lua/checkpoint_daemon.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/box/lua/checkpoint_daemon.lua b/src/box/lua/checkpoint_daemon.lua
index e7ef05fdb..ec129010f 100644
--- a/src/box/lua/checkpoint_daemon.lua
+++ b/src/box/lua/checkpoint_daemon.lua
@@ -80,6 +80,7 @@ local function daemon_fiber(self)
break
elseif msg == 'reload' then
log.info("reloaded") -- continue
+ offset = random % self.checkpoint_interval
elseif msg == nil and box.info.status == 'running' then
local s, e = pcall(process, self)
if not s then
--
2.14.3 (Apple Git-98)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tarantool-patches] Re: [PATCH] recovery: recount offset on checkpoint_interval change
2018-07-09 14:03 [tarantool-patches] [PATCH] recovery: recount offset on checkpoint_interval change Konstantin Belyavskiy
@ 2018-07-09 14:16 ` Georgy Kirichenko
0 siblings, 0 replies; 2+ messages in thread
From: Georgy Kirichenko @ 2018-07-09 14:16 UTC (permalink / raw)
To: tarantool-patches
Ok to merge
On Mon, Jul 09, 2018 at 05:03:14PM +0300, Konstantin Belyavskiy wrote:
> Next checkpoint time is set by the formula:
> period = self.checkpoint_interval + offset,
> where offset is defined as follow:
> offset = random % self.checkpoint_interval
>
> So offset must be calculated again if at least the new
> interval is less than the old one.
>
> Closes #3370
> ---
> Ticket: https://github.com/tarantool/tarantool/issues/3370
> Branch: https://github.com/tarantool/tarantool/compare/kbelyavs/gh-3370-fix-bug-with-wrong-snapshot-scheduling
> src/box/lua/checkpoint_daemon.lua | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/box/lua/checkpoint_daemon.lua b/src/box/lua/checkpoint_daemon.lua
> index e7ef05fdb..ec129010f 100644
> --- a/src/box/lua/checkpoint_daemon.lua
> +++ b/src/box/lua/checkpoint_daemon.lua
> @@ -80,6 +80,7 @@ local function daemon_fiber(self)
> break
> elseif msg == 'reload' then
> log.info("reloaded") -- continue
> + offset = random % self.checkpoint_interval
> elseif msg == nil and box.info.status == 'running' then
> local s, e = pcall(process, self)
> if not s then
> --
> 2.14.3 (Apple Git-98)
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-09 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-09 14:03 [tarantool-patches] [PATCH] recovery: recount offset on checkpoint_interval change Konstantin Belyavskiy
2018-07-09 14:16 ` [tarantool-patches] " Georgy Kirichenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox