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 4613E212BC for ; Sun, 10 Mar 2019 16:21:33 -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 xDtIHklM_djh for ; Sun, 10 Mar 2019 16:21:33 -0400 (EDT) Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 055DE211B3 for ; Sun, 10 Mar 2019 16:21:33 -0400 (EDT) From: Georgy Kirichenko Subject: [tarantool-patches] [PATCH] Don't free fiber gc on while txn_rollback Date: Sun, 10 Mar 2019 23:21:26 +0300 Message-Id: <102d071dcc331779234ab7ae1a6d90aa238c9f14.1552245126.git.georgy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 In some cases volatile memory should be usable after txn_rollback invocation. So move fiber_gx to the box_txn_rollback from the txn_rollback. Follow-up 77fa1736dbb9 box: factor fiber_gc out of txn_commit Branch: https://github.com/tarantool/tarantool/tree/g.kirichenko/gh-2618-txn-rollback-gc-follow-up --- src/box/txn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index 7900fb3ab..1f488bbcc 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -399,8 +399,6 @@ txn_rollback() txn_stmt_unref_tuples(stmt); TRASH(txn); - /** Free volatile txn memory. */ - fiber_gc(); fiber_set_txn(fiber(), NULL); } @@ -480,6 +478,8 @@ box_txn_rollback() return -1; } txn_rollback(); /* doesn't throw */ + /** Free volatile txn memory. */ + fiber_gc(); return 0; } -- 2.21.0