Skip to content

Commit 49b85c4

Browse files
alice-yydshorizonzydongzeXDYangruiEmmajoway
authored
chore: release v0.2.1 (#386)
* define not found instance error. * define ErrInstanceNotFound at kerrors. * tuning err msg for no instance. * refactor:replace additional atomic operations * fix:solving the concurrency problem of Hooks. * optimize: adjust minMaxIdleTimeout to 2s * optimize: lbcache is global, it doesn't need register ProbeFunc for diagnosis * docs: update readme with new blog * chore:upgrade choleraehyq/pid for Go 1.18 * fix(client): fix oneway seqid and lower loss rate (#363) * optimize: use instance tag instead of remoteinfo tag firstly (#374) * fix: combine services (#367) * fix(tool): fix import of protobuf combineservice (#359) * refactor(loadbalancer): merge function buildWeightedVirtualNodes into buildVirtualNodes (#343) * refactor(loadbalancer): merge function buildWeightedVirtualNodes into buildVirtualNodes * Fix readme blog link * fix(generic): detect circular thrift IDL dependency (#383) * chore: update version v0.2.1 Co-authored-by: horizonzy <[email protected]> Co-authored-by: dongzeXD <[email protected]> Co-authored-by: dongze <[email protected]> Co-authored-by: YangruiEmma <[email protected]> Co-authored-by: Joway <[email protected]> Co-authored-by: luoguangming.ivan <[email protected]> Co-authored-by: YangruiEmma <[email protected]> Co-authored-by: HeyJavaBean <[email protected]> Co-authored-by: lsjbd <[email protected]> Co-authored-by: Anthony-Dong <[email protected]> Co-authored-by: Simon Wang <[email protected]> Co-authored-by: 王恒 <[email protected]>
1 parent 98e6407 commit 49b85c4

File tree

24 files changed

+150
-109
lines changed

24 files changed

+150
-109
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ We provide the [kitex-benchmark](https://github.com/cloudwego/kitex-benchmark) p
9191

9292
- [Performance Optimization on Kitex](https://www.cloudwego.io/blog/2021/09/23/performance-optimization-on-kitex/)
9393
- [ByteDance Practice on Go Network Library](https://www.cloudwego.io/blog/2021/10/09/bytedance-practices-on-go-network-library/)
94+
- [Getting Started With Kitex's Practice: Performance Testing Guide](https://www.cloudwego.io/blog/2021/11/24/getting-started-with-kitexs-practice-performance-testing-guide/)
9495

9596
## Contributing
9697

@@ -106,7 +107,7 @@ Kitex is distributed under the [Apache License, version 2.0](https://github.com/
106107
- Issues: [Issues](https://github.com/cloudwego/kitex/issues)
107108
- Lark: Scan the QR code below with [Lark](https://www.larksuite.com/zh_cn/download) to join our CloudWeGo/kitex user group.
108109

109-
![LarkGroup](docs/images/lark_group.png)
110+
![LarkGroup](images/lark_group.png)
110111

111112
## Landscapes
112113

README_cn.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Kitex[kaɪt'eks] 字节跳动内部的 Golang 微服务 RPC 框架,具有**高
9191

9292
- [字节跳动 Go RPC 框架 Kitex 性能优化实践](https://www.cloudwego.io/zh/blog/2021/09/23/%E5%AD%97%E8%8A%82%E8%B7%B3%E5%8A%A8-go-rpc-%E6%A1%86%E6%9E%B6-kitex-%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96%E5%AE%9E%E8%B7%B5/)
9393
- [字节跳动在 Go 网络库上的实践](https://www.cloudwego.io/zh/blog/2021/10/09/%E5%AD%97%E8%8A%82%E8%B7%B3%E5%8A%A8%E5%9C%A8-go-%E7%BD%91%E7%BB%9C%E5%BA%93%E4%B8%8A%E7%9A%84%E5%AE%9E%E8%B7%B5/)
94+
- [RPC 框架 Kitex 实践入门:性能测试指南](https://www.cloudwego.io/zh/blog/2021/11/24/rpc-%E6%A1%86%E6%9E%B6-kitex-%E5%AE%9E%E8%B7%B5%E5%85%A5%E9%97%A8%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E6%8C%87%E5%8D%97/)
9495

9596
## 贡献代码
9697

@@ -106,7 +107,7 @@ Kitex 基于[Apache License 2.0](LICENSE) 许可证,其依赖的三方组件
106107
- Issues: [Issues](https://github.com/cloudwego/kitex/issues)
107108
- 飞书用户群([注册飞书](https://www.feishu.cn/)进群)
108109

109-
![LarkGroup](docs/images/lark_group_cn.png)
110+
![LarkGroup](images/lark_group_cn.png)
110111

111112
## Landscapes
112113

client/option.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ func WithHostPorts(hostports ...string) Option {
155155
}, nil
156156
},
157157
NameFunc: func() string { return o.Targets },
158+
TargetFunc: func(ctx context.Context, target rpcinfo.EndpointInfo) string {
159+
return o.Targets
160+
},
158161
}
159162
}}
160163
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/apache/thrift v0.13.0
77
github.com/bytedance/gopkg v0.0.0-20210910103821-e4efae9c17c3
88
github.com/cespare/xxhash v1.1.0
9-
github.com/choleraehyq/pid v0.0.12
9+
github.com/choleraehyq/pid v0.0.13
1010
github.com/cloudwego/netpoll v0.2.0
1111
github.com/cloudwego/netpoll-http2 v0.0.6
1212
github.com/cloudwego/thriftgo v0.1.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
1212
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
1313
github.com/choleraehyq/pid v0.0.12 h1:JLiTCsz2gStQZ3YWet+p9hktRnWzk7VJigpzvGV+I2o=
1414
github.com/choleraehyq/pid v0.0.12/go.mod h1:uhzeFgxJZWQsZulelVQZwdASxQ9TIPZYL4TPkQMtL/U=
15+
github.com/choleraehyq/pid v0.0.13 h1:Tc/jYjHC50SDCxSX+DWHfMmFqtwGR8EiQ08qJ/EK8zs=
16+
github.com/choleraehyq/pid v0.0.13/go.mod h1:uhzeFgxJZWQsZulelVQZwdASxQ9TIPZYL4TPkQMtL/U=
1517
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
1618
github.com/cloudwego/netpoll v0.1.0/go.mod h1:rZOiNI0FYjuvNybXKKhAPUja03loJi/cdv2F55AE6E8=
1719
github.com/cloudwego/netpoll v0.2.0 h1:MmZX/jS6ozso86mnbVJ7fUO1hL4LOH/XngXN7Pn347A=
File renamed without changes.
File renamed without changes.

pkg/connpool/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type IdleConfig struct {
2727

2828
const (
2929
defaultMaxIdleTimeout = 30 * time.Second
30-
minMaxIdleTimeout = 3 * time.Second
30+
minMaxIdleTimeout = 2 * time.Second
3131
)
3232

3333
// CheckPoolConfig to check invalid param.

pkg/diagnosis/interface.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const (
5050
DestServiceKey ProbeName = "dest_service"
5151
ConnPoolKey ProbeName = "conn_pool"
5252
RetryPolicyKey ProbeName = "retry_policy"
53-
LbCacheKey ProbeName = "lb_cache"
5453
)
5554

5655
// WrapAsProbeFunc is to wrap probe data as ProbeFunc, the data is some infos that you want to diagnosis, like config info.

pkg/event/queue.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package event
1919
import (
2020
"sync"
2121
"sync/atomic"
22-
"unsafe"
2322
)
2423

2524
const (
@@ -66,8 +65,7 @@ func (q *queue) Push(e *Event) {
6665
newV := oldV + 1
6766
if atomic.CompareAndSwapUint32(&q.tail, old, new) && atomic.CompareAndSwapUint32(q.tailVersion[old], oldV, newV) {
6867
q.mu.Lock()
69-
p := (*unsafe.Pointer)(unsafe.Pointer(&q.ring[old]))
70-
atomic.StorePointer(p, unsafe.Pointer(e))
68+
q.ring[old] = e
7169
q.mu.Unlock()
7270
break
7371
}

0 commit comments

Comments
 (0)