From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (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 3C6AF46970E for ; Wed, 5 Feb 2020 01:45:32 +0300 (MSK) Received: by mail-lf1-f68.google.com with SMTP id t23so15601lfk.6 for ; Tue, 04 Feb 2020 14:45:32 -0800 (PST) Date: Wed, 5 Feb 2020 01:45:29 +0300 From: Konstantin Osipov Message-ID: <20200204224529.GH17206@atlas> References: <20200128192249.10023-1-gorcunov@gmail.com> <20200128192249.10023-5-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200128192249.10023-5-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH v7 4/5] errinj: add ERRINJ_REPLICA_TXN_WRITE List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml * Cyrill Gorcunov [20/01/28 22:58]: > To test rollback error nil dereference > > Signed-off-by: Cyrill Gorcunov > --- > src/box/applier.cc | 6 + > src/lib/core/errinj.h | 1 + > test/box/errinj.result | 2614 +++++++++++++++++++++------------------- > 3 files changed, 1365 insertions(+), 1256 deletions(-) > > diff --git a/src/box/applier.cc b/src/box/applier.cc > index 967dc91de..e739f23e2 100644 > --- a/src/box/applier.cc > +++ b/src/box/applier.cc > @@ -51,6 +51,7 @@ > #include "txn.h" > #include "box.h" > #include "scoped_guard.h" > +#include "errinj.h" > > STRS(applier_state, applier_STATE); > > @@ -830,6 +831,11 @@ applier_apply_tx(struct stailq *rows) > trigger_create(on_commit, applier_txn_commit_cb, NULL, NULL); > txn_on_commit(txn, on_commit); > > + ERROR_INJECT(ERRINJ_REPLICA_TXN_WRITE, { > + diag_set(ClientError, ER_INJECTION, "replica txn write injection"); > + goto rollback; > + }); if the source of error is in txn_prepare(), I think the injection should be moved in it. but I see no way txn_prepare() could fail inside an applier, as long as we deal with memtx spaces. -- Konstantin Osipov, Moscow, Russia