Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH] Iproto call won't leak if transaction isn't committed
@ 2019-08-28 14:32 Maria Khaydich
  2019-08-29  8:11 ` [tarantool-patches] " Georgy Kirichenko
  2019-08-29  8:28 ` Georgy Kirichenko
  0 siblings, 2 replies; 4+ messages in thread
From: Maria Khaydich @ 2019-08-28 14:32 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Maria Khaydich

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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tarantool-patches] Re: [PATCH] Iproto call won't leak if transaction isn't committed
  2019-08-28 14:32 [tarantool-patches] [PATCH] Iproto call won't leak if transaction isn't committed Maria Khaydich
@ 2019-08-29  8:11 ` Georgy Kirichenko
  2019-08-29  8:28 ` Georgy Kirichenko
  1 sibling, 0 replies; 4+ messages in thread
From: Georgy Kirichenko @ 2019-08-29  8:11 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Maria Khaydich

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

LGTM, thanks!

On Wednesday, August 28, 2019 5:32:35 PM MSK Maria Khaydich wrote:
> 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-ipro
> to-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;


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tarantool-patches] Re: [PATCH] Iproto call won't leak if transaction isn't committed
  2019-08-28 14:32 [tarantool-patches] [PATCH] Iproto call won't leak if transaction isn't committed Maria Khaydich
  2019-08-29  8:11 ` [tarantool-patches] " Georgy Kirichenko
@ 2019-08-29  8:28 ` Georgy Kirichenko
  2019-08-29 10:40   ` Georgy Kirichenko
  1 sibling, 1 reply; 4+ messages in thread
From: Georgy Kirichenko @ 2019-08-29  8:28 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Maria Khaydich

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

Merged into 2.3, 2.2 and 1.10 as it affects all this versions

On Wednesday, August 28, 2019 5:32:35 PM MSK Maria Khaydich wrote:
> 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-ipro
> to-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;


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tarantool-patches] Re: [PATCH] Iproto call won't leak if transaction isn't committed
  2019-08-29  8:28 ` Georgy Kirichenko
@ 2019-08-29 10:40   ` Georgy Kirichenko
  0 siblings, 0 replies; 4+ messages in thread
From: Georgy Kirichenko @ 2019-08-29 10:40 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Maria Khaydich

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

Merged to 2.1
On Thursday, August 29, 2019 11:28:14 AM MSK Georgy Kirichenko wrote:
> Merged into 2.3, 2.2 and 1.10 as it affects all this versions
> 
> On Wednesday, August 28, 2019 5:32:35 PM MSK Maria Khaydich wrote:
> > 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-ip
> > ro to-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;


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-29 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 14:32 [tarantool-patches] [PATCH] Iproto call won't leak if transaction isn't committed Maria Khaydich
2019-08-29  8:11 ` [tarantool-patches] " Georgy Kirichenko
2019-08-29  8:28 ` Georgy Kirichenko
2019-08-29 10:40   ` Georgy Kirichenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox