You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Sergey Yelin (Jira)" <ji...@apache.org> on 2022/09/22 12:36:00 UTC

[jira] [Updated] (THRIFT-5636) Broken client in erlang client library

     [ https://issues.apache.org/jira/browse/THRIFT-5636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Yelin updated THRIFT-5636:
---------------------------------
    Summary: Broken client in erlang client library  (was: Broken tests in erlang client library)

> Broken client in erlang client library
> --------------------------------------
>
>                 Key: THRIFT-5636
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5636
>             Project: Thrift
>          Issue Type: Bug
>          Components: Erlang - Library
>    Affects Versions: 0.17.0
>            Reporter: Sergey Yelin
>            Priority: Major
>
> It looks like erlang client library are broken since this [fix|https://github.com/kpy3/thrift/commit/22f6a8a3c879175e18ce95f88a393f34ff8f158c].
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)