[
https://issues.apache.org/jira/browse/THRIFT-5793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Team_RPCtester updated THRIFT-5793:
-----------------------------------
Description:
Hi,
We have discovered an inconsistent behavior under the following conditions:
# The thrift file:
^struct StructClass_0^
^{ 1: required list<bool> f_1 }^
^service DataService^
^{ StructClass_0 Method_1(1: StructClass_0 agr_method_1) }^
2. When using Go as the client side(writer) and Node.js as the server
side(reader) with the protocol set to “{*}compact{*}” and the transport set to
“{*}framed{*}“ or “{*}buffered{*}”. We sent the value [true, false] to the
server, but the server receives [false, false], which is unexpected. Here is
the relevant code:We use agr_method_1_0 as the parameter sent to the client
side(writer).
agr_method_1_0 := commonResource.NewStructClass_0()
listItem := []{*}bool{*}{true, false}
agr_method_1_0.F_1 = listItem
Node.js Server: The server(reader) returns what it receives..
Method_1: *async* {*}function{*}(agr_method_1, result) \{console.log("Method_1
receives ", agr_method_1);// Method_1 receives {“f_1”:[false, false]}
result({*}null{*}, agr_method_1); }
Can you help check the issue?
Thank you.
was:
Hi,
We have discovered an inconsistent behavior under the following conditions:
# The thrift file:
struct StructClass_0 {
1: required list<bool> f_1
}
service DataService {
StructClass_0 Method_1(1: StructClass_0 agr_method_1)
}
2. When using Go as the client side(writer) and Node.js as the server
side(reader) with the protocol set to “{*}compact{*}” and the transport set to
“{*}framed{*}“ or “{*}buffered{*}”. We sent the value [true, false] to the
server, but the server receives [false, false], which is unexpected. Here is
the relevant code:We use agr_method_1_0 as the parameter sent to the client
side(writer).
{quote}{{ agr_method_1_0 := commonResource.NewStructClass_0()}}
listItem := []{*}bool{*}
Unknown macro: \{true, false}
{{ agr_method_1_0.F_1 = listItem}}
{quote}
Node.js Server: The server(reader) returns what it receives..
{quote}Method_1: *async* {*}function{*}(agr_method_1, result)
{console.log("Method_1 receives ", agr_method_1);// Method_1 receives
Unknown macro: \{“f_1”}
result({*}null{*}, agr_method_1); }
{quote}
Can you help check the issue?
Thank you.
> Inconsistent behavior: Nodejs may modify the values it receives
> ---------------------------------------------------------------
>
> Key: THRIFT-5793
> URL: https://issues.apache.org/jira/browse/THRIFT-5793
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Compiler, Node.js - Library
> Affects Versions: 0.19.0, 0.20.0
> Reporter: Team_RPCtester
> Priority: Major
>
> Hi,
> We have discovered an inconsistent behavior under the following conditions:
>
> # The thrift file:
> ^struct StructClass_0^
> ^{ 1: required list<bool> f_1 }^
> ^service DataService^
> ^{ StructClass_0 Method_1(1: StructClass_0 agr_method_1) }^
>
> 2. When using Go as the client side(writer) and Node.js as the server
> side(reader) with the protocol set to “{*}compact{*}” and the transport set
> to “{*}framed{*}“ or “{*}buffered{*}”. We sent the value [true, false] to the
> server, but the server receives [false, false], which is unexpected. Here is
> the relevant code:We use agr_method_1_0 as the parameter sent to the client
> side(writer).
> agr_method_1_0 := commonResource.NewStructClass_0()
> listItem := []{*}bool{*}{true, false}
> agr_method_1_0.F_1 = listItem
> Node.js Server: The server(reader) returns what it receives..
> Method_1: *async* {*}function{*}(agr_method_1, result)
> \{console.log("Method_1 receives ", agr_method_1);// Method_1 receives
> {“f_1”:[false, false]} result({*}null{*}, agr_method_1); }
> Can you help check the issue?
> Thank you.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)