thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King III (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (THRIFT-2954) calling function with parameter type different as defined in idl breaks the connection
Date Mon, 28 Jan 2019 03:18:00 GMT

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

James E. King III closed THRIFT-2954.
-------------------------------------
    Resolution: Cannot Reproduce
      Assignee: James E. King III

I believe this was fixed by THRIFT-3596 as when I attempt to send a string to something that
expects i32, the client raises an exception.

{noformat}
ERROR: testI32 (__main__.BinaryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/thrift/src/test/py/TestClient.py", line 132, in testI32
    self.client.testI32('foo')
  File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 466, in testI32
    self.send_testI32(thing)
  File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 473, in send_testI32
    args.write(self._oprot)
  File "/thrift/src/test/py/gen-py/ThriftTest/ThriftTest.py", line 2168, in write
    oprot.writeI32(self.thing)
  File "/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/protocol/TBinaryProtocol.py",
line 118, in writeI32
    buff = pack("!i", i32)
error: cannot convert argument to integer
{noformat}

> calling function with parameter type different as defined in idl breaks the connection
> --------------------------------------------------------------------------------------
>
>                 Key: THRIFT-2954
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2954
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Compiler, Python - Library
>    Affects Versions: 0.9.2
>         Environment: tried with python server/client and also with c++ server with python
client
>            Reporter: Nitin Kumar
>            Assignee: James E. King III
>            Priority: Critical
>
> say my idl (.thrift) file defines a function
> void fn(1: string if_name);
> if I call this function as fn(3) the connection get closed, hence not allowing next set
of function to be called. (function call has been kept within exception handling)
> but for other cases like if we call this function with 2 params in place of 1 as expected
by function. it just thrown exception but does not close the connection.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message