[ https://issues.apache.org/jira/browse/THRIFT-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346303#comment-16346303 ]
ASF GitHub Bot commented on THRIFT-4480: ---------------------------------------- GitHub user bforbis opened a pull request: https://github.com/apache/thrift/pull/1487 THRIFT-4480 - Handle seqid = 0 You can merge this pull request into a Git repository by running: $ git pull https://github.com/bforbis/thrift THRIFT-4480 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1487.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1487 ---- commit 8dbe2ef0a0b5a7baf3ce9fe7df6a246f855d6599 Author: Brian Forbis <bforbis@...> Date: 2018-01-31T05:34:55Z THRIFT-4480 - Handle seqid = 0 ---- > NodeJS warning on binary_protocol writeMessageEnd when seqid = 0 > ---------------------------------------------------------------- > > Key: THRIFT-4480 > URL: https://issues.apache.org/jira/browse/THRIFT-4480 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library > Affects Versions: 0.11.0 > Reporter: Brian Forbis > Priority: Minor > > The nodeJS implementation of binary protocol has some internal state that > keeps track of the `seqid` between calls to `writeMessageBegin` and > `writeMessageEnd`. There is a line that will emit a warning if the seqid > can't be unset: > {code:java} > TBinaryProtocol.prototype.writeMessageEnd = function() { > if (this._seqid) { > this._seqid = null; > } else { > log.warning('No seqid to unset'); > } > };{code} > > but it does not take into account that the seqid can be set to "0" which is a > falsey value. This causes warnings to be emitted for valid messages. > This bug can be reproduced by connecting a perl client to a nodeJS server. > Perl will always send a sequenceID of 0, causing the warning to occur every > time the node server responds to an RPC request. > > Even though this warn line has been in the nodeJS library for several > releases, the bug only affects thrift version 11 because until that version > the logger had not been implemented yet and would swallow all warnings. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)