From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B574C26859 for ; Wed, 4 Jul 2018 13:23:11 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zP9DTlDZITYO for ; Wed, 4 Jul 2018 13:23:11 -0400 (EDT) Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 725F62684F for ; Wed, 4 Jul 2018 13:23:11 -0400 (EDT) Received: from [185.6.245.178] (port=48400 helo=atlas.local) by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1falUj-0005KK-R4 for tarantool-patches@freelists.org; Wed, 04 Jul 2018 20:23:09 +0300 Date: Wed, 4 Jul 2018 20:23:09 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v4 2/2] replication: force gc to clean xdir on ENOSPC err Message-ID: <20180704172309.GA19470@chai> References: <20180703130347.26296-1-k.belyavskiy@tarantool.org> <20180703130347.26296-3-k.belyavskiy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180703130347.26296-3-k.belyavskiy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org * Konstantin Belyavskiy [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