[tarantool-patches] Re: [PATCH] recovery: recount offset on checkpoint_interval change
Georgy Kirichenko
georgy at tarantool.org
Mon Jul 9 17:16:54 MSK 2018
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)
>
>
More information about the Tarantool-patches
mailing list