[
https://issues.apache.org/jira/browse/THRIFT-3950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16535848#comment-16535848
]
ASF GitHub Bot commented on THRIFT-3950:
----------------------------------------
bforbis edited a comment on issue #1568: THRIFT-3950: Memory leak while calling
oneway methods
URL: https://github.com/apache/thrift/pull/1568#issuecomment-402201087
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:
[email protected]
> Memory leak while calling oneway method
> ---------------------------------------
>
> Key: THRIFT-3950
> URL: https://issues.apache.org/jira/browse/THRIFT-3950
> 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
(v7.6.3#76005)