Tarantool development patches archive
 help / color / mirror / Atom feed
From: Georgy Kirichenko <georgy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Georgy Kirichenko <georgy@tarantool.org>
Subject: [tarantool-patches] [PATCH] Don't free fiber gc on while txn_rollback
Date: Sun, 10 Mar 2019 23:21:26 +0300	[thread overview]
Message-ID: <102d071dcc331779234ab7ae1a6d90aa238c9f14.1552245126.git.georgy@tarantool.org> (raw)
In-Reply-To: <cover.1552248901.git.georgy@tarantool.org>

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

  reply	other threads:[~2019-03-10 20:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-10 20:21 [tarantool-patches] [PATCH v3 0/2] Transaction boundaries for applier Georgy Kirichenko
2019-03-10 20:21 ` Georgy Kirichenko [this message]
2019-03-11  8:12   ` [tarantool-patches] Re: [PATCH] Don't free fiber gc on while txn_rollback Konstantin Osipov
2019-03-10 20:21 ` [tarantool-patches] [PATCH v3 1/2] Write rows without a lsn to the transaction tail Georgy Kirichenko
2019-03-11  8:14   ` [tarantool-patches] " Konstantin Osipov
2019-03-11  8:40   ` [tarantool-patches] " Vladimir Davydov
2019-03-11  9:59   ` [tarantool-patches] " Konstantin Osipov
2019-03-11 10:54     ` Georgy Kirichenko
2019-03-11 14:04       ` Konstantin Osipov
2019-03-11 19:52         ` Георгий Кириченко
2019-03-10 20:21 ` [tarantool-patches] [PATCH v3 2/2] Transaction support for applier Georgy Kirichenko
2019-03-11  8:18   ` [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=102d071dcc331779234ab7ae1a6d90aa238c9f14.1552245126.git.georgy@tarantool.org \
    --to=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH] Don'\''t free fiber gc on while 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