Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v2] txn: factor fiber_gc out of txn_rollback
Date: Mon, 11 Mar 2019 17:21:49 +0300	[thread overview]
Message-ID: <20190311142149.GC13774@chai> (raw)
In-Reply-To: <20190311122738.th4hyzm56oojriyt@esperanza>

* Vladimir Davydov <vdavydov.dev@gmail.com> [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

      reply	other threads:[~2019-03-11 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 11:56 [tarantool-patches] " Georgy Kirichenko
2019-03-11 12:27 ` Vladimir Davydov
2019-03-11 14:21   ` Konstantin Osipov [this message]

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=20190311142149.GC13774@chai \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [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