Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH v2 4/4] wal: delete old wal files when running out of disk space
Date: Thu, 25 Oct 2018 11:31:57 +0300	[thread overview]
Message-ID: <20181025083157.rgc5vtt5d7ghgaqj@esperanza> (raw)
In-Reply-To: <20181024165334.GC12973@chai>

On Wed, Oct 24, 2018 at 07:53:34PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev@gmail.com> [18/10/24 12:55]:
> > No, this isn't true. WAL watcher was introduced as a generic
> > notification channel built over cbus in the first place. Before
> > it was made available, we used inotify to track WAL directory
> > changes in relays.
> > 
> > > Now you can send a direct message to gc. Why use wal watcher api at
> > > all?
> > 
> > Because we already have a generic abstraction, and I think we'd better
> > use it instead of adding another wal-tx pipe to the wal_thread and
> > implementing home-brewed notifications on top of it.
> 
> Well, the pipe costs nearly nothing at runtime. It is point to
> point delivery. The watcher api is broadcast by nature. Can't we use
> the existing pipe? We no longer delete any files on the receiving
> side. 

We still need to invoke gc_run() upon receiving a message, because the
WAL thread deletes WAL files only until it can proceed while there may
be more to delete after a replica is discarded. Besides, when we finally
implement persistent garbage collector we'll have to unregister stale
replicas in the message handler, which implies yielding.

If we decided to use the existing WAL -> TX pipe, we'd have to do the
same work the watcher implementation already does so why not reuse it if
we already have it?

      reply	other threads:[~2018-10-25  8:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 17:26 [PATCH v2 0/4] Delete old WAL files if " Vladimir Davydov
2018-10-23 17:26 ` [PATCH v2 1/4] xlog: turn use_coio argument of xdir_collect_garbage to flags Vladimir Davydov
2018-10-23 18:17   ` Konstantin Osipov
2018-10-24 11:21     ` Vladimir Davydov
2018-10-23 17:26 ` [PATCH v2 2/4] wal: preallocate disk space before writing rows Vladimir Davydov
2018-10-23 18:33   ` Konstantin Osipov
2018-10-24  9:54     ` Vladimir Davydov
2018-10-23 17:26 ` [PATCH v2 3/4] wal: notify watchers about wal file removal Vladimir Davydov
2018-10-23 17:26 ` [PATCH v2 4/4] wal: delete old wal files when running out of disk space Vladimir Davydov
2018-10-23 18:46   ` Konstantin Osipov
2018-10-24  9:51     ` Vladimir Davydov
2018-10-24 16:53       ` Konstantin Osipov
2018-10-25  8:31         ` Vladimir Davydov [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=20181025083157.rgc5vtt5d7ghgaqj@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH v2 4/4] wal: delete old wal files when running out of disk space' \
    /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