File tree Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change 33* Removed ` CustomOption ` and taking client with custom options
44* Removed ` proxy ` package
55* Improved ` db.With() ` helper for child connections creation
6- * Set shared ` conn.Pool ` for all children ` ydb.Connection `
6+ * Set shared ` conn.Pool ` for all children ` ydb.Connection `
7+ * Fixed bug with ` RoundRobin ` and ` RandomChoice ` balancers ` Create() `
78
89## 3.12.1
910* Added ` trace.Driver.OnConnPark ` event
Original file line number Diff line number Diff line change @@ -28,14 +28,7 @@ type roundRobin struct {
2828}
2929
3030func (r * roundRobin ) Create () balancer.Balancer {
31- return & roundRobin {
32- min : r .min ,
33- max : r .max ,
34- belt : r .belt ,
35- next : r .next ,
36- conns : r .conns ,
37- r : rand .New (),
38- }
31+ return RoundRobin ()
3932}
4033
4134func RoundRobin () balancer.Balancer {
@@ -58,16 +51,7 @@ type randomChoice struct {
5851}
5952
6053func (r * randomChoice ) Create () balancer.Balancer {
61- return & randomChoice {
62- roundRobin : roundRobin {
63- min : r .roundRobin .min ,
64- max : r .roundRobin .max ,
65- belt : r .roundRobin .belt ,
66- next : r .roundRobin .next ,
67- conns : r .roundRobin .conns ,
68- r : rand .New (),
69- },
70- }
54+ return RandomChoice ()
7155}
7256
7357func (r * roundRobin ) Next () conn.Conn {
You can’t perform that action at this time.
0 commit comments