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 184B92BACD for ; Wed, 24 Apr 2019 15:12: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 wP7KFtGNt3bH for ; Wed, 24 Apr 2019 15:12:13 -0400 (EDT) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C2665286F8 for ; Wed, 24 Apr 2019 15:12:12 -0400 (EDT) Received: by mail-lj1-f195.google.com with SMTP id y6so17923043ljd.12 for ; Wed, 24 Apr 2019 12:12:12 -0700 (PDT) Date: Wed, 24 Apr 2019 22:12:09 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 05/10] Get rid of fiber_gc from txn_rollback Message-ID: <20190424191209.GE21344@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/04/19 19:59]: The patch is LGTM, please see one comment below. > index fabb4bb48..1f6b30f4a 100644 > --- a/src/box/vy_scheduler.c > +++ b/src/box/vy_scheduler.c > @@ -889,8 +889,10 @@ vy_deferred_delete_batch_process_f(struct cmsg *cmsg) > for (int i = 0; i < batch->count; i++) { > if (vy_deferred_delete_process_one(deferred_delete_space, > pk->space_id, pk->mem_format, > - &batch->stmt[i]) != 0) > + &batch->stmt[i]) != 0) { > + txn_rollback(txn); > goto fail; > + } > } > I would add a new label, fail_rollback, this would be more with vinyl style. > if (txn_commit(txn) != 0) > @@ -900,7 +902,7 @@ vy_deferred_delete_batch_process_f(struct cmsg *cmsg) > fail: > batch->is_failed = true; > diag_move(diag_get(), &batch->diag); > - txn_rollback(); > + fiber_gc(); > } > -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov