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 6F94E21BBF for ; Thu, 5 Jul 2018 14:39:08 -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 fR2laCut5iHD for ; Thu, 5 Jul 2018 14:39:08 -0400 (EDT) Received: from smtp2.mail.ru (smtp2.mail.ru [94.100.179.91]) (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 A3EE92096D for ; Thu, 5 Jul 2018 14:39:07 -0400 (EDT) Received: from [185.6.245.156] (port=18976 helo=localhost.localdomain) by smtp2.mail.ru with esmtpa (envelope-from ) id 1fb99m-0006pd-2N for tarantool-patches@freelists.org; Thu, 05 Jul 2018 21:39:06 +0300 From: Konstantin Belyavskiy Subject: [tarantool-patches] [PATCH v5 0/2] force gc on running out of disk space Date: Thu, 5 Jul 2018 21:39:03 +0300 Message-Id: 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 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. Changes in V2: - Promoting error from wal_thread to tx via cpipe. Changes in V3: - Delete consumers and only for replicas (but not backup). Changes in V4: - Bug fix and small changes according to review. Changes in V5: - Compare signatures of the oldest replica and the oldest snapshot to keep to prevent deletion if it will not free any disk space. - Add say_crit on consumer deletion with a little information. Tichet: https://github.com/tarantool/tarantool/issues/3397 Branch: https://github.com/tarantool/tarantool/compare/kbelyavs/gh-3397-force-del-logs-on-no-disk-space Konstantin Belyavskiy (2): replication: rename thread from tx to tx_prio replication: force gc to clean xdir on ENOSPC err src/box/box.cc | 1 + src/box/gc.c | 62 +++++++++++ src/box/gc.h | 18 +++ src/box/relay.cc | 1 + src/box/wal.cc | 44 ++++++-- src/errinj.h | 1 + src/fio.c | 7 ++ test/box/errinj.result | 2 + test/replication/kick_dead_replica_on_enspc.result | 121 +++++++++++++++++++++ .../kick_dead_replica_on_enspc.test.lua | 56 ++++++++++ test/replication/suite.ini | 2 +- 11 files changed, 306 insertions(+), 9 deletions(-) create mode 100644 test/replication/kick_dead_replica_on_enspc.result create mode 100644 test/replication/kick_dead_replica_on_enspc.test.lua -- 2.14.3 (Apple Git-98)