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

Node Thrift client throws exception with multiplexer and responses that are bigger than a single buffer

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

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

      Description

      In a situation using the node.js library to make requests using the buffered transport, binary protocol and the multiplexer, I've been getting an exception on receiving responses from line 145 of connection.js (https://github.com/apache/thrift/blob/0.9.3/lib/nodejs/lib/thrift/connection.js).

      at TCP.onread (net.js:531:20)
      at Socket.Readable.push (_stream_readable.js:111:10)
      at readableAddChunk (_stream_readable.js:153:18)
      at Socket.emit (events.js:169:7)
      at emitOne (events.js:77:13)
      at Socket.<anonymous> (/src/node_modules/thrift/lib/nodejs/lib/thrift/buffered_transport.js:48:5)
      at /src/node_modules/thrift/lib/nodejs/lib/thrift/connection.js:151:35
      TypeError: Cannot set property '-1' of undefined

      It looks like the issue is that if a message consists of multiple parts, the first part removes the seqid to service mapping in line 142, then it's no longer available for the second part thus the error. If I'm right the fix would be to remove the mapping later on once the final part has arrived.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              mark9white Mark White

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment