Tarantool development patches archive
 help / color / mirror / Atom feed
From: Georgy Kirichenko <georgy@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH] recovery: recount offset on checkpoint_interval change
Date: Mon, 9 Jul 2018 17:16:54 +0300	[thread overview]
Message-ID: <20180709141654.GA18875@tarantool.org> (raw)
In-Reply-To: <20180709140314.96501-1-k.belyavskiy@tarantool.org>

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)
> 
> 

      reply	other threads:[~2018-07-09 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 14:03 [tarantool-patches] " Konstantin Belyavskiy
2018-07-09 14:16 ` Georgy Kirichenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180709141654.GA18875@tarantool.org \
    --to=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] recovery: recount offset on checkpoint_interval change' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox