From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Georgy Kirichenko <georgy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] [PATCH v2] txn: factor fiber_gc out of txn_rollback
Date: Mon, 11 Mar 2019 15:27:38 +0300 [thread overview]
Message-ID: <20190311122738.th4hyzm56oojriyt@esperanza> (raw)
In-Reply-To: <9f046ffc5c88f28b817b9c351d257c9c1b3cfc47.1552305225.git.georgy@tarantool.org>
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.
next prev parent reply other threads:[~2019-03-11 12:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 11:56 Georgy Kirichenko
2019-03-11 12:27 ` Vladimir Davydov [this message]
2019-03-11 14:21 ` [tarantool-patches] " Konstantin Osipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190311122738.th4hyzm56oojriyt@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=georgy@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v2] txn: factor fiber_gc out of txn_rollback' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox