[tarantool-patches] Re: [PATCH v4 2/2] replication: force gc to clean xdir on ENOSPC err

Konstantin Osipov kostja at tarantool.org
Wed Jul 4 20:23:09 MSK 2018

* Konstantin Belyavskiy <k.belyavskiy at 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.


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

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

More information about the Tarantool-patches mailing list