Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maria Khaydich <maria.khaydich@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Maria Khaydich <maria.khaydich@tarantool.org>
Subject: [tarantool-patches] [PATCH] Iproto call won't leak if transaction isn't committed
Date: Wed, 28 Aug 2019 17:32:35 +0300	[thread overview]
Message-ID: <20190828143235.44805-1-maria.khaydich@tarantool.org> (raw)

In case of throwing client error because of unfinished
transaction we did not destroy used port. It could possibly
cause huge memory leaks as could be seen with top or its
analogues when performing net.box test run in a loop.

Closes #4388
---
Issue:
https://github.com/tarantool/tarantool/issues/4388
Branch:
https://github.com/tarantool/tarantool/tree/eljashm/gh-4388-uncommitted-iproto-leaks-not

 src/box/call.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/box/call.c b/src/box/call.c
index ac2bf3004..169210767 100644
--- a/src/box/call.c
+++ b/src/box/call.c
@@ -132,6 +132,7 @@ box_process_call(struct call_request *request, struct port *port)
 
 	if (txn != NULL) {
 		diag_set(ClientError, ER_FUNCTION_TX_ACTIVE);
+		port_destroy(port);
 		txn_rollback(txn);
 		fiber_gc();
 		return -1;
-- 
2.20.1 (Apple Git-117)

             reply	other threads:[~2019-08-28 14:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 14:32 Maria Khaydich [this message]
2019-08-29  8:11 ` [tarantool-patches] " Georgy Kirichenko
2019-08-29  8:28 ` Georgy Kirichenko
2019-08-29 10:40   ` Georgy Kirichenko

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=20190828143235.44805-1-maria.khaydich@tarantool.org \
    --to=maria.khaydich@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH] Iproto call won'\''t leak if transaction isn'\''t committed' \
    /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