chao6118 opened a new issue, #8158: URL: https://github.com/apache/incubator-seata/issues/8158
### Check Ahead - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. - [x] I am willing to try to fix this bug myself. ### Ⅰ. Issue Description SEATA_IP=seata.aaa.com 时,XID 生成的是域名前缀 seata.aaa.com:8092:12345。 XIDLoadBalance.select() 用 InetSocketAddress.equals() 比较 XID 的域名和通道池里解析后的 IP, 域名 vs IP 永远不匹配。 每次分支事务注册都走 fallback 随机负载均衡,高并发下有性能开销。 Root Cause: XID.java:55-62 直接拼接 SEATA_IP,不做解析 InetSocketAddress 带域名创建时是 unresolved,equals() 不解析只比字符串 建议: 在 XIDLoadBalance.select() 中先判断 isUnresolved(),如果 true 解析成 IP 再比 或者文档明确要求 SEATA_IP 必须填 IP ### Ⅱ. Describe what happened SEATA_IP=seata.aaa.com 时,XID 生成的是域名前缀 seata.aaa.com:8092:12345。 XIDLoadBalance.select() 用 InetSocketAddress.equals() 比较 XID 的域名和通道池里解析后的 IP, 域名 vs IP 永远不匹配。 每次分支事务注册都走 fallback 随机负载均衡,高并发下有性能开销。 Root Cause: XID.java:55-62 直接拼接 SEATA_IP,不做解析 InetSocketAddress 带域名创建时是 unresolved,equals() 不解析只比字符串 建议: 在 XIDLoadBalance.select() 中先判断 isUnresolved(),如果 true 解析成 IP 再比 或者文档明确要求 SEATA_IP 必须填 IP ### Ⅲ. Describe what you expected to happen _No response_ ### Ⅳ. How to reproduce it (as minimally and precisely as possible) _No response_ ### Ⅴ. Anything else we need to know? _No response_ ### Ⅵ. Environment _No response_ -- 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]
