dengzhhu653 commented on code in PR #3131: URL: https://github.com/apache/thrift/pull/3131#discussion_r2065077588
########## lib/java/src/main/java/org/apache/thrift/transport/TServerSocket.java: ########## @@ -122,6 +126,7 @@ public TSocket accept() throws TTransportException { throw new TTransportException("Blocking server's accept() may not return NULL"); } TSocket socket = new TSocket(result); + socket.getConfiguration().deepCopy(configuration_); Review Comment: Hi @fishy, I'm confused here, do you mean this line: https://github.com/apache/thrift/blob/aa5f183312201bda890ab0065ec26d9e8a23b9f9/lib/java/src/main/java/org/apache/thrift/transport/TServerTransport.java#L62 I create a new `TConfiguration` for the compatibility of `maxFrameSize(int maxFrameSize) ` method(for pushing the maxFrameSize to the TConfiguration directly), and this calls at the service startup, there is no transport pipeline built successfully yet. After the server accepting the connection, the transport pipeline should reuse the TSocket's configuration, the new change is say the same story per my understanding, as I don't change how to propagate the `TConfiguration` through the stack. To make the propagation and validation clear, I raised another PR https://github.com/apache/thrift/pull/3127, for a stack like: TSocket -> TSaslTransport(TMemoryInputTransport) -> TUGIAssumingTransport Before: 1, TSocket, TSaslTransport and TMemoryInputTransport, have a local reference to the same `TConfiguration`. 2, TSocket, TSaslTransport and TMemoryInputTransport have it own private `knownMessageSize` and `remainingMessageSize`, updated and checked separately. After: 1, TSaslTransport and TMemoryInputTransport don't have such local reference, while TSaslTransport can use `getConfiguration` to retrieve the `TConfiguration` from end TSocket, same to TUGIAssumingTransport, which ensures the same `TConfiguration` is shared across the stack. 2, Only TSocket updates and checks the message size. -- 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