Kitex v0.7.2 版本发布
项目:
重要变更介绍
功能
1. 重试: 限制重试请求占比
该特性优化了备用请求的可用性:如某个请求超过重试等待时间,会触发一个备用请求,但如果该请求在RPC超时阈值之内,最终可以正常处理,因而不会被当做失败请求,这会在偶发网络异常时导致大量重试请求,增加服务端压力甚至引起雪崩。
建议更新现有代码:
- 使用
retry.NewRetryContainerWithPercentageLimit()
来构造 RetryContainer,限制重试请求占比; - 在 Client 初始化时添加选项
client.WithCloseCallbacks(container.Close)
,以便在 client 被回收时释放相关资源。
优化
1. gRPC
- unary 请求发送 END_STREAM flag
- 修复 grpc streaming 吞吐下降与压缩器选择逻辑
2. 长连接池
如果没有指定 MaxIdleGlobal
则默认不限制,简化长连接池的使用配置。
其他
详细变更
Feature:
- [#1117] feat(retry): support retry percentage limit
Optimize:
- [#1033] optimize: no need to check svcInfo twice
- [#1115] optimize: rm outdated framed suggestion
- [#1095] optimize: add K_METHOD in serviceinline ctx
- [#1107] optimize(connpool): set maxIdleGlobal to no limit if not set
Fix:
- [#1116] fix: use the last rpcinfo to trace
- [#1104] fix: move limiter handler to the last of the inbound handler to get rpcinfo in custom limiter
- [#1103] fix: reset all fields of netpoll byte buffer when recycle it
- [#1106] fix(grpc): fix grpc streaming tps decreasing and the selection logic of compressor
- [#1114] fix(gRPC): client send END_STREAM flag in unary call (#1066)
- [#1096] fix(tool): add backquote to handle filepath string invalid syntax under windows os
- [#1098] fix(tool): fix import for codegen template when using slim and unknown fields
Tests:
- [#1124] test: fix codegen script
- [#1122] test: add codegen test
- [#1119] test(connpool): modify the idleTimeout
Chore:
- [#1133] chore: update version v0.7.2
- [#1125] chore: upgrade netpoll to v0.5.0
- [#1123] perf: replace concurrent string builder with lock
- [#1118] perf: optimize remote addr setter interface to reduce lock cost of Address()
- [#1110] chore: upgrade netpoll to v0.4.2 pre-release
- [#1061] chore: netpoll pre release v0.4.2
- [#1100] chore: enable frugal on go1.21