[ 
https://issues.apache.org/jira/browse/THRIFT-5802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870096#comment-17870096
 ] 

Team_RPCtester commented on THRIFT-5802:
----------------------------------------

Dear [~jensg] ,

We are currently focusing on discovering issues that we believe are bugs. Yet, 
we do need the confirmation from the project owner before acting on it further. 
We will try to contribute a fix if the issue is confirmed. And we are willing 
to help fix these issues and hope to engage more deeply with the development 
process. Any pointer or guidence is appreciated.  Can you please provide some 
guidance on where we should look into for this issue. 

>  Inconsistent Validation for transmitted values
> -----------------------------------------------
>
>                 Key: THRIFT-5802
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5802
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Team_RPCtester
>            Priority: Major
>
> *Hi,*
> We discover an inconsistent behavior under V20.0 and V19.0 by the following 
> example.
> The thrift file:
> {code:java}
> namespace java com.example
> namespace go commonResource
> service DataService {
>   set<i8> Method_1(1: set<i8> agr_method_1)
> }
> {code}
> When using Go,Py3 and Node.js as the client side(writer) and Node.js as the 
> server side(reader) with the protocol set to “json” and the transport set to 
> “framed“. We sent the value [10, 43, 38, 38, -2]to the server, but the server 
> received differently. The received are respectively nothing, [10, 43, 38, -2] 
> and [10, 43, 38, 38, -2] from Go,Py3 and Node.js which is unexpected.  Here 
> is the relevant code:We use agr_method_1_0 as the parameter sent to the 
> client side(writer).
> Go  client side : It throws an error “[]int8 error writing set field: slice 
> is not unique  back”
> {code:java}
> set_item_0 := []int8 {10, 43, 38, 38, -2}
> re_1, err := dataserviceclient.Method_1(context.Background(),set_item_0)
> if err != nil {
>    fmt.Println("Method_1 receives error ", err, " back")
> } else {
>    fmt.Println("Method_1 receives ", re_1, " back")
> }
> {code}
> py3  client side 
> {code:java}
> agr_method_1 = [10, 43, 38, 38, -2]
> try:
>    re_1 = client.Method_1(agr_method_1)
>    # re_1:  [10, 43, 38, -2]
> except Exception as ex:
>    print(f"Method_1 receives error {ex} back")
> {code}
> Nodejs client side 
> {code:java}
> const arg_Method_1 = [10, 43, 38, 38, -2];
> console.log("Method_1 sends ", arg_Method_1, " end");
> try {
>  const re_1 = await client.Method_1(arg_Method_1);
>  console.log("Method_1 receives ", re_1, " back");
>  //re_1 [10, 43, 38, 38, -2]
> } catch (error) {
>  console.log("Method_1 receives error ", error, " back");
> }
> {code}
> Nodejs server:
> {code:java}
> Method_1: async function(agr_method_1, result) {
>  console.log("Method_1 receives ", agr_method_1);
>  result(null, agr_method_1);
> }
> {code}
> The Go client throws an error before transmitting the parameter, indicating 
> that the items are not unique. The Node.js client transmits the duplicate 
> values and receives duplicated values from the Node.js server. The Python 
> client automatically de-duplicates the values and receives the de-duplicated 
> values. This behavior is inconsistent across the different clients.
> Can you help check the issue?
> Thank you.
>  



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

Reply via email to