XiaoFeiASK commented on PR #1125:
URL: 
https://github.com/apache/incubator-seata-go/pull/1125#issuecomment-4797401799

   新增修改
   
     pkg/integration/rocketmq/end_transaction_sender.go
   
   1. 问题: 每次 Send 都新建 TCP 连接,并发场景下产生大量短连接
      修复: 新增 connPool + defaultTCPSender,按 broker 地址维度复用连接(默认 4 
连接),支持池连接失效后自动重试一次新连接,并带惰性空闲清理(60s 间隔 / 10min 超时)
      影响: 避免高并发下的连接风暴,降低延迟和资源消耗
   
   2. 问题: queryBrokerAddrFromNameServer 中 DialTimeout 写死 3s,与外层 timeout 不一致
      修复: 将 net.DialTimeout 的第三个参数改为从 sendEndTransaction 透传下来的 timeout 变量
      影响: 超时行为统一,便于通过配置全局控制
   
   3. 问题: 自定义 readFull 封装,功能与标准库 io.ReadFull 完全重复
      修复: 删除 readFull 函数,所有调用处直接使用 io.ReadFull
      影响: 减少无意义封装,代码更简洁
   
   4. 问题: decodeResponseHeader 中硬编码 13,无注释说明含义
      修复: 定义常量 rmqResponseHeaderFixedPartLength = 13,并注释说明各字段字节构成(code 2 + 
language 1 + version 2 + opaque 4 + flag 4)
      影响: 提升可维护性,后续开发者一目了然
   
   5. 问题: encodeExtFields 对 key 做 sort.Strings 排序,Broker 解析并不依赖顺序
      修复: 移除排序逻辑,直接使用 for range 遍历 map
      影响: 消除无意义排序开销,编码逻辑与 RocketMQ 协议语义一致


-- 
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]

Reply via email to