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

Broken client in erlang client library

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.17.0
    • 0.18.0
    • Erlang - Library
    • None

    Description

      It looks like erlang client library are broken since this fix.

      Now some of read tests for thrift_socket_transport module fail because of timeout while waiting data from the mocked gen_tcp:recv/3 call (because of infinite loop in thrift_socket_transport:loop_recv/3). 

      In production, calling to thrift_socket_transport:read/2 will lead to infinite loop if remote server stop sending data to socket or received data size is less than requested.

      It looks like gen_tcp:recv/3 should not try to receive all data from socket (passing 0 to call) and not try to retrieve big amount of data (hiding underlying call), but set some reasonable value and get data by chunks or passing control flow to client.

      Attachments

        Issue Links

          Activity

            People

              kpy3 Sergey Yelin
              kpy3 Sergey Yelin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m