Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, gorcunov@gmail.com
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] recovery: make it yield when positioning in a WAL
Date: Wed, 12 May 2021 14:30:17 +0300	[thread overview]
Message-ID: <7efe2a01-2a79-7605-15c4-d238959118b7@tarantool.org> (raw)
In-Reply-To: <70224f08-737b-db3c-b809-1472ed603568@tarantool.org>

29.04.2021 23:03, Vladislav Shpilevoy пишет:
> Hi! Thanks for the patch!
> Technically looks good now, can be pushed.
> But in case you would find it interesting: now relay->row_count looks odd.
> Because its comment is not very correct, most of that is moved to the
> recovery layer. And because it is used only by initial join. And because we
> still have a single place where we use xstream/recovery, but the yields
> are not managed by them.
> Did you think about moving your code to xstream instead of recovery? Then
> it would be truly not related to recovery. It would have 2 methods:
> - write(struct xstream *, struct xrow_header *)
> - skip(struct xstream *, struct xrow_header *)
> Recovery calls skip() while establishes a position, for each skipped row.
> Relaying from memory never calls skip, but calls only write() like now.
> In order to yield you inherit xtream, add a member row_count, and both in
> skip() and write() increment it like you do. And then yield periodically.
> It would work for the initial join too.
> Or add row_count right to the xtream struct, and replace skip() with your
> function schedule_yield(). This way row_count would be visible to recovery
> and available for reporting in the logs like '... rows recovered'. And we
> wouldn't all too many virtual functions for the skipped rows.
> All that up to you.

Thanks for your input!

I took the approach with moving schedule_yield to struct xstream.
Please, check it out in v2.

Serge Petrenko

      reply	other threads:[~2021-05-12 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 16:59 Serge Petrenko via Tarantool-patches
2021-04-26 21:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-04-28 15:34   ` Serge Petrenko via Tarantool-patches
2021-04-28 20:50     ` Vladislav Shpilevoy via Tarantool-patches
2021-04-29  8:55       ` Serge Petrenko via Tarantool-patches
2021-04-29 20:03         ` Vladislav Shpilevoy via Tarantool-patches
2021-05-12 11:30           ` Serge Petrenko via Tarantool-patches [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:

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

  git send-email \
    --in-reply-to=7efe2a01-2a79-7605-15c4-d238959118b7@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=sergepetrenko@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] recovery: make it yield when positioning in a WAL' \


* 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