Skip to content

Commit a2426f9

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 a2426f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)