From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 11 Mar 2019 15:27:38 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v2] txn: factor fiber_gc out of txn_rollback Message-ID: <20190311122738.th4hyzm56oojriyt@esperanza> References: <9f046ffc5c88f28b817b9c351d257c9c1b3cfc47.1552305225.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f046ffc5c88f28b817b9c351d257c9c1b3cfc47.1552305225.git.georgy@tarantool.org> To: Georgy Kirichenko Cc: tarantool-patches@freelists.org List-ID: 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.