Skip to content

Commit

Permalink
perf: use kitex BinaryProtocol replace apache BinaryProtocol
Browse files Browse the repository at this point in the history
  • Loading branch information
YangruiEmma committed Aug 15, 2024
1 parent 5668b82 commit d3aea58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/remote/codec/thrift/thrift.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func encodeBasicThrift(out remote.ByteBuffer, ctx context.Context, method string
}
_ = thrift.Binary.WriteMessageBegin(b, method, thrift.TMessageType(msgType), seqID)

if err := apache.ThriftWrite(apache.NewDefaultTransport(out), data); err != nil {
if err := apache.ThriftWrite(out, data); err != nil {
return err
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/remote/codec/thrift/thrift_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func decodeBasicThriftData(trans remote.ByteBuffer, data interface{}) error {
if err = verifyUnmarshalBasicThriftDataType(data); err != nil {
return err
}
if err = apache.ThriftRead(apache.NewDefaultTransport(trans), data); err != nil {
if err = apache.ThriftRead(trans, data); err != nil {
return remote.NewTransError(remote.ProtocolError, err)
}
return nil
Expand Down

0 comments on commit d3aea58

Please sign in to comment.