[
https://issues.apache.org/jira/browse/THRIFT-5862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946343#comment-17946343
]
Jens Geyer commented on THRIFT-5862:
------------------------------------
Why don't we fix the issue instead?
> Validate the message size at the endpoint transport only
> --------------------------------------------------------
>
> Key: THRIFT-5862
> URL: https://issues.apache.org/jira/browse/THRIFT-5862
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Library
> Reporter: Zhihua Deng
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> In a chain of Thrift transports, currently every transport holds, updates and
> checks the knownMessageSize based on the bytes fed, however this is not
> straightforward and confused somehow. If one of transport changes the limit
> after the initialization, the knownMessageSize still remains the old until a
> reset, and if the chain only has TSocket, then it doesn't even check the
> limit.
> We should have an endpoint transport in a chain which gets fed from external
> source, so it's more reasonable to validate the limit here instead of all the
> downstream transports.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)