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 3D703256B5 for ; Thu, 7 Jun 2018 00:24:55 -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 0g1scMN3YnDI for ; Thu, 7 Jun 2018 00:24:55 -0400 (EDT) Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [217.69.128.36]) (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 5526E256B4 for ; Thu, 7 Jun 2018 00:24:53 -0400 (EDT) From: Georgy Kirichenko Subject: [tarantool-patches] Re: [PATCH] replication: force gc to clean xdir on ENOSPC err Date: Thu, 07 Jun 2018 07:24:47 +0300 Message-ID: <8690646.X4a4VE2vVn@home.lan> In-Reply-To: <20180606092752.96792-1-k.belyavskiy@tarantool.org> References: <20180606092752.96792-1-k.belyavskiy@tarantool.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1688213.4zLk2bKf4c"; micalg="pgp-sha256"; protocol="application/pgp-signature" 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 Cc: Konstantin Belyavskiy --nextPart1688213.4zLk2bKf4c Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Wednesday, June 6, 2018 12:27:52 PM MSK Konstantin Belyavskiy wrote: > 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. > > @@ -180,8 +180,13 @@ process_rw(struct request *request, struct space > *space, struct tuple **result) * when WAL is written in autocommit mode. > */ > TupleRefNil ref(tuple); > - if (txn_commit_stmt(txn, request) != 0) > + if (txn_commit_stmt(txn, request) != 0) { 1. Here you will mark as dead as many replicas as many in-flight commiting requests you have. 2. I think you should send some message from wal thread to advance gc. In that case you will be able to use fallocate without any tx thread changes. > + struct error *e = diag_last_error(diag_get()); > + if (e != NULL && e->type == &type_ClientError && > + box_error_code(e) == ER_NO_DISK_SPACE) > + gc_leftmost_mark_dead(); > return -1; --nextPart1688213.4zLk2bKf4c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEBJFDbU76LsBbgHBsvKOmCX79zb4FAlsYs48ACgkQvKOmCX79 zb4yOgf/a2xKaJ/L7yLzEAYDkPGTACM2k4DVcjK6VMsZe2MiE+cABAz+pvxJjNbt 9cF6rNQBTjKE4W2VoeyzPNe7lDFRNmfP6Kx2Xw5gtPjx0gA2BZgjfLr8FTsOJjWE NP8oFdJDQNPg7n43eYeJuHVLhfW9qo4MeI9aZAk0NKVWNeS5VcR+j2Pt0txzZXsb 0f0zL7bTKJXC70FLYbLQRhAv1tumac+uJw68jsWJIBqcPCKRAqMvy5hsCnLN+QaT IAdhcctmgSJjjp76cPQHnSgZ12AZvFtmJrmIqv4GN3k494T+wjkqn8PWjOfhnHTM SMViDH6vshwK/su+R9uea4+rP6RZzQ== =al4A -----END PGP SIGNATURE----- --nextPart1688213.4zLk2bKf4c--