lyl2008dsg commented on code in PR #7095: URL: https://github.com/apache/incubator-seata/pull/7095#discussion_r1976330421
########## core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java: ########## @@ -193,6 +198,7 @@ public Object sendSyncRequest(Channel channel, Object msg) throws TimeoutExcepti return null; } RpcMessage rpcMessage = buildRequestMessage(msg, ProtocolConstants.MSGTYPE_RESQUEST_SYNC); + channelToRequestIds.computeIfAbsent(channel, ch -> ConcurrentHashMap.newKeySet()).add(rpcMessage.getId()); Review Comment: You're right that extracting computeIfAbsent into super.sendSync would reduce duplication and missed calls. However, since this is a client-side issue, I won't move it to AbstractNettyRemoting for now. -- 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...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org