EarthChen commented on code in PR #10658: URL: https://github.com/apache/dubbo/pull/10658#discussion_r1005184479
########## dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/TripleIsolationExecutorSupport.java: ########## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.rpc.protocol.tri.transport; + +import io.netty.handler.codec.http2.Http2Headers; +import org.apache.dubbo.common.ServiceKey; +import org.apache.dubbo.common.URL; +import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; +import org.apache.dubbo.common.logger.LoggerFactory; +import org.apache.dubbo.rpc.protocol.tri.TripleHeaderEnum; +import org.apache.dubbo.rpc.executor.AbstractIsolationExecutorSupport; + +public class TripleIsolationExecutorSupport extends AbstractIsolationExecutorSupport { + private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(TripleIsolationExecutorSupport.class); + + public TripleIsolationExecutorSupport(URL url) { + super(url); + } + + @Override + protected ServiceKey getServiceKey(Object data) { Review Comment: The servicekey seems to have been obtained in onheader, can it be reused? But there is a problem here, onheader is already in the business thread pool, you may need to pay attention ########## dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/TripleHttp2FrameServerHandler.java: ########## @@ -109,6 +107,8 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc } public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame msg) throws Exception { + Executor executor = executorSupport.getExecutor(msg); Review Comment: I think that the calculation of the thread pool can be put into the onheader method, and the previous part of the logic can be executed in the eventloop. (Only basic judgment, no complex logic) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
