Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4480

NodeJS warning on binary_protocol writeMessageEnd when seqid = 0

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: Node.js - Library
    • Labels:
      None

      Description

      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:

      TBinaryProtocol.prototype.writeMessageEnd = function() {
          if (this._seqid) {
              this._seqid = null;
          } else {
              log.warning('No seqid to unset');
          }
      };

       

      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.

       

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              bforbis Brian Forbis

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment