Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Subject: [Tarantool-patches] [PATCH 0/3] box/txn: fix assert in txn_rollback
Date: Thu, 27 Feb 2020 17:16:25 +0300	[thread overview]
Message-ID: <20200227141628.13782-1-gorcunov@gmail.com> (raw)

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

             reply	other threads:[~2020-02-27 14:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 14:16 Cyrill Gorcunov [this message]
2020-02-27 14:16 ` [Tarantool-patches] [PATCH 1/3] box/txn: rename txn_write to txn_commit_async Cyrill Gorcunov
2020-02-27 14:16 ` [Tarantool-patches] [PATCH 2/3] box/txn: log error explicitly in txn_commit Cyrill Gorcunov
2020-02-27 14:16 ` [Tarantool-patches] [PATCH 3/3] box/txn: clear fiber storage right before journal_write Cyrill Gorcunov
2020-02-27 19:47   ` Kirill Yukhin
2020-02-27 20:20     ` Cyrill Gorcunov
2020-02-27 20:27       ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200227141628.13782-1-gorcunov@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 0/3] box/txn: fix assert in txn_rollback' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox