Open kasecato opened 4 months ago
It sounds like a bug. Are you interested in sending a PR?
By the way, how did you find the bug?
I have no plans to create this PR since I'm not familiar with the scope of impact
I was using the Thrift documentation service and found that Thrift binary was large just for TTEXT
My use case is for storing data in Thrift binary messages in Redis, and it's deserialized again and responded to by Armeria Thrift service
I think you use TTEXT
only for documentation services so the impact of the bug is not critical. I will fix the bug and include it in 1.30.0.
If not, please let me know.
We also use TTEXT
for (de)serializing Thrift objects for CMS APIs, but we're aware that it's not really the intended use case of TTEXT
. And we don't use binary
fields there. So I feel like this kind of change should have minimum impact.
TTEXT
parser of Armeria Thrift is calling values ofbinray
type without reference toposition
andlimit
ofByteBuffer
.org.apache.thrift.TDeserializer
still has the behavior of returningByteBuffer
withposition
andlimit
.When
binary
type is deserialized withorg.apache.thrift.TDeserializer
,ByteBuffer
has a reference to all bytes of the object withposition
andlimit
, and all bytes are retrieved when accessed withval.array()
.