oudecheng 6fc6d5628f perf(gateway): send_with_retry 对 ChannelFull 不重试,加速队列消费
ws 连接队列满时,sender task 原本重试 3 次浪费 1+2+4=7s,期间 channel 队列堆积。新增 ChannelError::ChannelFull 变体区分队列满错误,CliChannel::send 在 try_send Full 时返回该变体;send_with_retry 遇到 ChannelFull 立即返回不重试,sender task 记 warn(预期背压丢弃)而非 error。

- base.rs: 新增 ChannelFull 变体及 Display 实现
- cli.rs: try_send 错误区分 Full(ChannelFull,不可重试)与 Closed(SendError,可重试)
- outbound_dispatcher.rs: send_with_retry 短路返回 ChannelFull;run_sender_task 区分日志级别;新增 TestChannel.with_channel_full 及单测验证不重试(500ms 阈值内返回 + send 仅调用一次)
2026-08-05 11:14:53 +08:00
..