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 BB255238F6 for ; Mon, 11 Mar 2019 10:21:51 -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 Q_Dm62VXK1dh for ; Mon, 11 Mar 2019 10:21:51 -0400 (EDT) Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 70FE1233A7 for ; Mon, 11 Mar 2019 10:21:51 -0400 (EDT) Received: by smtp55.i.mail.ru with esmtpa (envelope-from ) id 1h3LoL-0004YV-66 for tarantool-patches@freelists.org; Mon, 11 Mar 2019 17:21:49 +0300 Date: Mon, 11 Mar 2019 17:21:49 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2] txn: factor fiber_gc out of txn_rollback Message-ID: <20190311142149.GC13774@chai> References: <9f046ffc5c88f28b817b9c351d257c9c1b3cfc47.1552305225.git.georgy@tarantool.org> <20190311122738.th4hyzm56oojriyt@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311122738.th4hyzm56oojriyt@esperanza> 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 * Vladimir Davydov [19/03/11 15:31]: Maybe we find a way to drop this patch altogether? > On Mon, Mar 11, 2019 at 02:56:31PM +0300, Georgy Kirichenko wrote: > > 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; > > } > > Run this > > tarantool> for i = 1, 1000000 do pcall(box.space._schema.insert, box.space._schema, {'max_id'}) end > > and see RSS grow. > > I think you should also free memory on txn_rollback_stmt. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov