From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CBCDB445320 for ; Tue, 21 Jul 2020 11:42:22 +0300 (MSK) Received: by mail-lf1-f66.google.com with SMTP id s9so2493888lfs.4 for ; Tue, 21 Jul 2020 01:42:22 -0700 (PDT) Date: Tue, 21 Jul 2020 11:42:19 +0300 From: Cyrill Gorcunov Message-ID: <20200721084219.GD4221@grain> References: <604448b08f80aaffb7ec7847ba4d3db58c17fa4d.1595277631.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <604448b08f80aaffb7ec7847ba4d3db58c17fa4d.1595277631.git.v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 1/2] txn: single failure point for WAL and TX commit errors List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On Mon, Jul 20, 2020 at 10:43:05PM +0200, Vladislav Shpilevoy wrote: > Txn_commit() uses journal_write() function to send requests to WAL > thread. journal_write() can return 0/-1, but these codes have > nothing to do with the actual write result. journal_write() only > signals whether the interaction with WAL thread finished > successfully. It tells nothing about what happened in this > interaction. > > To check WAL write result need to look at journal_entry.res field. > As a result, there were 2 failure points to handle. One of them > wasn't handled for synchronous transactions. Not counting 4 > failure points in other places: > > - When can't prepare the transaction before commit; > - When can't allocate a journal entry; > - When can't append a new entry to the qsync limbo; > - When synchronous transaction completion wait fails. > > This patch merges all the failure points into one place for > txn_commit(). > > Closes #5146 Acked-by: Cyrill Gorcunov