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 D90DC2EDAB for ; Mon, 17 Jun 2019 01:16:13 -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 IRiQ1IqV9S29 for ; Mon, 17 Jun 2019 01:16:13 -0400 (EDT) Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 1AF572DC1D for ; Mon, 17 Jun 2019 01:16:12 -0400 (EDT) Date: Sun, 16 Jun 2019 19:38:25 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v3 06/14] txn: get rid of fiber_gc from txn_rollback Message-ID: <20190616163825.GC28257@atlas> References: <95ba261a4768ec78f5e94596cdeb215ee1068cc2.1560112747.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95ba261a4768ec78f5e94596cdeb215ee1068cc2.1560112747.git.georgy@tarantool.org> 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 Cc: Georgy Kirichenko * Georgy Kirichenko [19/06/09 23:47]: > Don't touch a fiber gc storage on a transaction rollback explicitly. > This relaxes dependencies between fiber and transaction life cycles. > Generally, it's quite difficult to track what review comments you addressed since you didn't reply to the review email :( There is also no link to the branch :( > Prerequisites: #1254 > --- > src/box/applier.cc | 8 +++++--- > src/box/box.cc | 14 +++++++++----- > src/box/call.c | 22 ++++++++++++++++------ > src/box/memtx_engine.c | 3 ++- > src/box/txn.c | 35 +++++++++++++++++------------------ > src/box/txn.h | 8 ++++++-- > src/box/vy_scheduler.c | 10 +++++++--- > 7 files changed, 62 insertions(+), 38 deletions(-) > > diff --git a/src/box/applier.cc b/src/box/applier.cc > index e3203a4c8..5a92f6109 100644 > --- a/src/box/applier.cc > +++ b/src/box/applier.cc > @@ -190,7 +190,7 @@ apply_initial_join_row(struct xrow_header *row) > fiber_gc(); > return rc; > rollback: > - txn_rollback(); > + txn_rollback(txn); > return -1; > } shouldn't there be a fiber_gc() here? > @@ -334,7 +336,7 @@ apply_wal_row(struct xstream *stream, struct xrow_header *row) > } > if (box_process_rw(&request, space, NULL) != 0) { > say_error("error applying row: %s", request_str(&request)); > - txn_rollback(); > + txn_rollback(txn); and here? > @@ -395,7 +401,7 @@ txn_commit(struct txn *txn) > if (txn->n_new_rows + txn->n_applier_rows > 0) { > txn->signature = txn_write_to_wal(txn); > if (txn->signature < 0) > - goto fail; > + return -1; > } I still don't understand this change. -- Konstantin Osipov, Moscow, Russia