Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v4 2/2] replication: force gc to clean xdir on ENOSPC err
Date: Wed, 4 Jul 2018 20:23:09 +0300	[thread overview]
Message-ID: <20180704172309.GA19470@chai> (raw)
In-Reply-To: <20180703130347.26296-3-k.belyavskiy@tarantool.org>

* Konstantin Belyavskiy <k.belyavskiy@tarantool.org> [18/07/03 16:07]:
> Garbage collector do not delete xlog unless replica do not notify
> master with newer vclock. This can lead to running out of disk
> space error and this is not right behaviour since it will stop the
> master.
> Fix it by forcing gc to clean xlogs for replica with highest lag.
> Add an error injection and a test.

Konstantin,

Thank you for taking into account my comments.

There is one comment that needs to be addressed still.

Imagine the following situation:

checkpoint_count = 2
backup is not in progress
we have a replica
we run out of disk space.


In this situation, your patch will remove all replicas from the
consumer, but it will not help with the disk space, because gc
still keeps references to old xlogs thanks to checkpoint_count
configuration. 

You should only delete replicas from the consumer *iff* deleting
them will help with removing a little bit of garbage - e.g. if the
files the replica is referencing are not referenced by "immortal" 
consumers, such as checkpoint daemon or backup daemon.

Hope this example makes my previous comment clear, if not, let's
discuss f2f.


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  reply	other threads:[~2018-07-04 17:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 13:03 [tarantool-patches] [PATCH v4 0/2] force gc on running out of disk space Konstantin Belyavskiy
2018-07-03 13:03 ` [tarantool-patches] [PATCH v4 1/2] replication: rename thread from tx to tx_prio Konstantin Belyavskiy
2018-07-03 13:03 ` [tarantool-patches] [PATCH v4 2/2] replication: force gc to clean xdir on ENOSPC err Konstantin Belyavskiy
2018-07-04 17:23   ` Konstantin Osipov [this message]
2018-07-04 17:24   ` [tarantool-patches] " 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=20180704172309.GA19470@chai \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v4 2/2] replication: force gc to clean xdir on ENOSPC err' \
    /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