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 BC0B52577A for ; Mon, 12 Aug 2019 18:29:04 -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 nCvhQVhfFQzB for ; Mon, 12 Aug 2019 18:29:04 -0400 (EDT) Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 7CD8D25531 for ; Mon, 12 Aug 2019 18:29:04 -0400 (EDT) Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1hxIoI-00040i-QT for tarantool-patches@freelists.org; Tue, 13 Aug 2019 01:29:02 +0300 Date: Tue, 13 Aug 2019 01:29:02 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 10/13] wal: make wal_sync fail on write error Message-ID: <20190812222902.GC32337@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 * Vladimir Davydov [19/08/10 23:22]: > wal_sync() simply flushes the tx<->wal request queue, it doesn't > guarantee that all pending writes are successfully committed to disk. > This works for now, but in order to implement replica join off the > current read view, we need to make sure that all pending writes have > been persisted and won't be rolled back before we can use memtx > snapshot iterators. So this patch adds a return code to wal_sync(): > since now on it returns -1 if rollback is in progress and hence > some in-memory changes are going to be rolled back. We will use > this method after opening memtx snapshot iterators used for feeding > a consistent read view a newly joined replica so as to ensure that > changes frozen by the iterators have made it to the disk. Please add a test case, otherwise LGTM. -- Konstantin Osipov, Moscow, Russia