go_serialization_benchmarks icon indicating copy to clipboard operation
go_serialization_benchmarks copied to clipboard

Add apache thrift

Open ii64 opened this issue 3 years ago • 3 comments

Apache Thrift v0.15.0

ii64 avatar Sep 30 '21 20:09 ii64

Somehow the JSON protocol seems buggy (check json unmarshal test), the rests are fine (TCompact, TBinary)

ii64 avatar Sep 30 '21 20:09 ii64

Look: TMemoryBuffer uses bytes.Buffer , the Close() method calls bytes.Buffer.Reset so that it can be used for next operation but it turns out the result .Bytes() giving empty byte slice https://github.com/apache/thrift/blob/e27e82c46ba4/lib/go/thrift/memory_buffer.go#L68-L71 image

Meanwhile TCompact: image

and TBinary: image

ii64 avatar Sep 30 '21 20:09 ii64

Ok forgot to add the .Flush method call

ii64 avatar Sep 30 '21 21:09 ii64