From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (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 84069469719 for ; Thu, 27 Feb 2020 17:16:35 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id w1so3604932ljh.5 for ; Thu, 27 Feb 2020 06:16:35 -0800 (PST) From: Cyrill Gorcunov Date: Thu, 27 Feb 2020 17:16:25 +0300 Message-Id: <20200227141628.13782-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/3] box/txn: fix assert in txn_rollback List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Currently both synchronous and asynchronous commits use async write engine, which implies that commit happens when txn is already unbound from fiber. Thus we should make it so right before we pass txn into journal level, otherwise if error happens for example in allocation (journal_entry_new) the assert will trigger. Side note: there is longstanding work on journal methods redesign which I didn't complete yet but lets fix this issue earlier since bugs are the bugs and must be fixed. branch gorcunov/gh-4031-txn_write_to_wal-hotfix issue https://github.com/tarantool/tarantool/issues/4776 There is a problem in passing this branch via gitlab since the master branch is failing itself. But I tested it manually to trigger assert without the patch applied. Please take a look once time permit. Cyrill Gorcunov (3): box/txn: rename txn_write to txn_commit_async box/txn: log error explicitly in txn_commit box/txn: clear fiber storage right before journal_write src/box/applier.cc | 2 +- src/box/journal.c | 6 ++++++ src/box/txn.c | 10 ++++++---- src/box/txn.h | 2 +- src/lib/core/errinj.h | 3 ++- test/box/errinj.result | 20 ++++++++++++++++++++ test/box/errinj.test.lua | 7 +++++++ 7 files changed, 43 insertions(+), 7 deletions(-) base-commit: 9d7686fcc879d7edbb73cf216a76bb290cd64352 -- 2.20.1