Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Георгий Кириченко" <georgy@tarantool.org>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 1/7] Refactoring: wal writer fiber and queue
Date: Tue, 20 Aug 2019 13:57:59 +0300	[thread overview]
Message-ID: <2116647.NrKqILBjjZ@localhost> (raw)
In-Reply-To: <20190816135331.GB18643@atlas>

[-- Attachment #1: Type: text/plain, Size: 1697 bytes --]

On Friday, August 16, 2019 4:53:32 PM MSK Konstantin Osipov wrote:
> * Georgy Kirichenko <georgy@tarantool.org> [19/08/13 10:30]:
> > As wal processes all writes in a cbus loop fiber it isn't possible to
> > yield while write. The patch introduces a wal write queue and a wal write
> > fiber which fetch a batch from queue and writes it out. Also checkpoint
> > requests are going now throw the queue to synchronize a tx checkpoint
> 
> though
> 
> > status with wal.
> 
> I don't understand this patch.
> 
> First, WAL already runs in a fiber, and you can yield.
wal could not yield because the same fiber processes cbus events. So there is 
no chance to wake this fiber up because there is no running fiber to process 
cbus input.
> 
> cord_costart creates a new fiber, please check out the implementation.
> 
> this is done by this commit:
> 
>     commit f4625e64eb99c17910d3f0bcd323e5d82b6d5b31
>     Author: Vladimir Davydov <vdavydov.dev@gmail.com>
>     Date:   Wed Jul 4 20:20:55 2018 +0300
> 
>     vinyl: use cbus for communication between scheduler and worker threads
> 
>     We need cbus for forwarding deferred DELETE statements generated in a
>     worker thread during primary index compaction to the tx thread where
>     they can be inserted into secondary indexes. Since pthread mutex/cond
>     and cbus are incompatible by their nature, let's rework communication
>     channel between the tx and worker threads using cbus.
> 
>     Needed for #2129
> 
> Check out the commit, it changes cord_start() to cord_costart().
> 
> 
> Second, checkpoint message already flushed the queue. So I don't
> understand why you need a switch over message type.
> 
> Let's discuss online.


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-08-20 10:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13  6:27 [tarantool-patches] [PATCH 0/7] Replication: In-memory replication Georgy Kirichenko
2019-08-13  6:27 ` [tarantool-patches] [PATCH 1/7] Refactoring: wal writer fiber and queue Georgy Kirichenko
2019-08-16 13:53   ` [tarantool-patches] " Konstantin Osipov
2019-08-20 10:57     ` Георгий Кириченко [this message]
2019-08-21 10:18   ` [tarantool-patches] " Vladimir Davydov
2019-08-13  6:27 ` [tarantool-patches] [PATCH 2/7] Refactoring: Track wal files using gc state Georgy Kirichenko
2019-08-21 10:44   ` Vladimir Davydov
2019-08-13  6:27 ` [tarantool-patches] [PATCH 3/7] Replication: Relay does not rely on xlog boundaries Georgy Kirichenko
2019-08-21 11:35   ` Vladimir Davydov
2019-08-13  6:27 ` [tarantool-patches] [PATCH 4/7] Replication: wal memory buffer Georgy Kirichenko
2019-08-21 11:57   ` Vladimir Davydov
2019-08-13  6:27 ` [tarantool-patches] [PATCH 5/7] Replication: in memory replication Georgy Kirichenko
2019-08-21 13:52   ` Vladimir Davydov
2019-08-13  6:27 ` [tarantool-patches] [PATCH 6/7] Refactoring: remove wal_watcher routines Georgy Kirichenko
2019-08-21 13:52   ` Vladimir Davydov
2019-08-13  6:27 ` [tarantool-patches] [PATCH 7/7] Refactoring: get rid of on_close_log Georgy Kirichenko
2019-08-21 13:52   ` Vladimir Davydov
2019-08-16 13:47 ` [tarantool-patches] Re: [PATCH 0/7] Replication: In-memory replication Konstantin Osipov

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=2116647.NrKqILBjjZ@localhost \
    --to=georgy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 1/7] Refactoring: wal writer fiber and queue' \
    /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