From 613028f02aa9478e1099b945fee7473f5ab23ff8 Mon Sep 17 00:00:00 2001 From: Roman Golov Date: Fri, 8 Nov 2024 14:44:08 +0300 Subject: [PATCH 1/4] Use `pick_first` balancer for discovery attempts --- CHANGELOG.md | 2 ++ internal/balancer/balancer.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 622c7c3b5..6710165a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Used `pick_first` balancer for discovery attempts + ## v3.90.1 * Small broken change: added method `ID()` into `spans.Span` interface (need to implement in adapter) * Fixed traceparent header for tracing grpc requests diff --git a/internal/balancer/balancer.go b/internal/balancer/balancer.go index 6534e0a20..54b75d04b 100644 --- a/internal/balancer/balancer.go +++ b/internal/balancer/balancer.go @@ -202,6 +202,9 @@ func makeDiscoveryFunc( append( driverConfig.GrpcDialOptions(), grpc.WithBlock(), + grpc.WithDefaultServiceConfig(`{ + "loadBalancingPolicy": "pick_first" + }`), )..., ) if err != nil { From 74fe93fa2dee1ffa1c50a51fa47779a5cfa16e4d Mon Sep 17 00:00:00 2001 From: Aleksey Myasnikov Date: Fri, 8 Nov 2024 14:46:52 +0300 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6710165a5..6416550a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -* Used `pick_first` balancer for discovery attempts +* Setted the `pick_first` balancer for discovery attempts ## v3.90.1 * Small broken change: added method `ID()` into `spans.Span` interface (need to implement in adapter) From e7e9177ccc803c18774f33e3e5bda424a679cc6d Mon Sep 17 00:00:00 2001 From: Aleksey Myasnikov Date: Fri, 8 Nov 2024 15:02:06 +0300 Subject: [PATCH 3/4] Update CHANGELOG.md From 5d7d6ccaf80b366dced287aef53ccd6ea6fa0db6 Mon Sep 17 00:00:00 2001 From: Aleksey Myasnikov Date: Fri, 8 Nov 2024 15:42:54 +0300 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6416550a7..842d3daa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -* Setted the `pick_first` balancer for discovery attempts +* Set the `pick_first` balancer for short-lived grpc connection inside ydb cluster discovery attempt ## v3.90.1 * Small broken change: added method `ID()` into `spans.Span` interface (need to implement in adapter)