dengzhhu653 commented on PR #3127:
URL: https://github.com/apache/thrift/pull/3127#issuecomment-2820750276

   > -1 Would love to hear the reason for this. Really.
   
   Hi @Jens-G, mainly two reasons:
    - In a chain of transports, every transport(current all Transports extend 
TEndpointTransport) updates and checks the 
knownMessageSize/remainingMessageSize based on the bytes fed, this is not 
straightforward and confused, which one should take effect, what if a transport 
updates the max message size via 
`TTransport#getConfiguration.setMaxMessageSize`.
    - For a service, we should always have an endpoint transport which gets fed 
from external source in a chain,  it's more reasonable to validate the limit 
here instead of all the downstream transports.
   
   For a chain which has only TSocket, this configured limit doesn't take 
effect, and no clear way to mark the boundary of the message, i.e, assumption 
on `TTransport#flush` to set the message end.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to