thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (THRIFT-3950) Memory leak while calling oneway method
Date Sat, 07 Jul 2018 17:13:00 GMT


ASF GitHub Bot commented on THRIFT-3950:

bforbis edited a comment on issue #1568: THRIFT-3950: Memory leak while calling oneway methods
   This code only affects the clientside, not the server side. This is not about sending a
serverside oneway response, it's about executing the supplied clientside callback after the
client requested oneway has been sent to the server. The clientside callback will resolve
immediately with `null` once the message has been flushed to the server to notify the application
that it successfully sent the oneway.
   Otherwise, this allows for two bad behaviors which this PR fixes:
   1. Supplied callbacks to oneways on the client will build up in the _reqs registry and
never get executed since oneways will never receive responses.
   2. All client calls return promises that can be waited on with `await` or put in a promise
chain with `.then()`. Except oneways will never resolve, since their callback just gets put
into a registry and never executed, causing an application that waits on a oneway to hang
forever. If the client call returns a promise, that promise should have the option to be resolved
(in this case, immediately) to prevent this from happening. Otherwise, it should not return
a `then`able at all.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Memory leak while calling oneway method
> ---------------------------------------
>                 Key: THRIFT-3950
>                 URL:
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Sangmin Yoon
>            Priority: Major
> When you call oneway methods in Node.js, Service._reqs object is bloated.
> There is no chance to 'delete this._reqs[rseqid];' because no return from server.
> Also Connection.seqId2Service is bloated.

This message was sent by Atlassian JIRA

View raw message