Skip to content

Commit 58aa3e1

Browse files
committed
node/grpc: Return to passthrough address resolution scheme
979811e switched SN-to-SN gRPC dial approach from 'passthrough' resolution scheme (used by `grpc.Dial*` functions) to the `dns` one (`grpc.NewClient`). This was not intentional, but it did cause visible changes in behavior. The DNS resolver began to introduce time costs into processing. This became especially noticeable on the test macOS env, where delays reached 10s causing tests to fall on deadline. On Linux, delays also increased, but by negligible amounts. This returns SN to using global 'passthrough' resolver. Fixes #3250. Signed-off-by: Leonard Lyubich <[email protected]>
1 parent 490e7b1 commit 58aa3e1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Changelog for NeoFS Node
3030
- Unclosed network connections in CLI (#3326)
3131
- SN no longer fails tombstone verification on `ALREADY_REMOVED` member's status (#3327)
3232
- Panic in search (#3333)
33+
- SN gRPC dialer switched from problematic `dns` address resolver to the `passthrough` one (#3334)
3334

3435
### Changed
3536
- IR calls `ObjectService.SearchV2` to select SG objects now (#3144)

cmd/neofs-node/grpc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ import (
1414
"google.golang.org/grpc"
1515
"google.golang.org/grpc/credentials"
1616
"google.golang.org/grpc/keepalive"
17+
"google.golang.org/grpc/resolver"
1718
)
1819

1920
func initGRPC(c *cfg) {
21+
// although docs state that 'passthrough' is set by default, it should be set explicitly for activation
22+
resolver.SetDefaultScheme("passthrough")
23+
2024
if c.cfgMorph.client == nil {
2125
initMorphComponents(c)
2226
}

0 commit comments

Comments
 (0)