Skip to content

Commit 972bdc0

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 327a6f2 commit 972bdc0

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
@@ -34,6 +34,7 @@ Changelog for NeoFS Node
3434
- Race between basic income processing stages leading to distribution failures in some cases (#3338)
3535
- Wallet password logged by IR in some error cases (#3340)
3636
- Embedded CN not stopped properly in some error cases potentially leading to inconsistent blockchain DB state (#3340)
37+
- SN gRPC dialer switched from problematic `dns` address resolver to the `passthrough` one (#3334)
3738

3839
### Changed
3940
- 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)