From ab073961210bca7edcaee6c4499ff678cf6bf35f Mon Sep 17 00:00:00 2001 From: Bharath Horatti Date: Wed, 24 Apr 2024 10:28:47 +0530 Subject: [PATCH] fix(): Update registry dial timers Increased registry dial out timers for NS and NSE clients. Signed-off-by: Bharath Horatti --- .../sdk/pkg/networkservice/common/refresh/client.go | 2 +- .../sdk/pkg/registry/chains/client/ns_client.go | 2 +- .../sdk/pkg/registry/chains/client/nse_client.go | 2 ++ .../sdk/pkg/registry/common/dial/ns_client.go | 2 +- .../sdk/pkg/registry/common/dial/nse_client.go | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/networkservicemesh/sdk/pkg/networkservice/common/refresh/client.go b/vendor/github.com/networkservicemesh/sdk/pkg/networkservice/common/refresh/client.go index 191cc5f..740074c 100644 --- a/vendor/github.com/networkservicemesh/sdk/pkg/networkservice/common/refresh/client.go +++ b/vendor/github.com/networkservicemesh/sdk/pkg/networkservice/common/refresh/client.go @@ -133,7 +133,7 @@ func after(ctx context.Context, conn *networkservice.Connection) time.Duration { scale := 1. / 3. path := conn.GetPath() if len(path.PathSegments) > 1 { - scale = 0.2 + 0.2*float64(path.Index)/float64(len(path.PathSegments)) + scale = 0.4 + 0.4*float64(path.Index)/float64(len(path.PathSegments)) } duration := time.Duration(float64(*minTimeout) * scale) diff --git a/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/ns_client.go b/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/ns_client.go index 37c00c1..ba6f668 100644 --- a/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/ns_client.go +++ b/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/ns_client.go @@ -51,7 +51,7 @@ func NewNetworkServiceRegistryClient(ctx context.Context, opts ...Option) regist clientconn.NewNetworkServiceRegistryClient(), dial.NewNetworkServiceRegistryClient(ctx, dial.WithDialOptions(clientOpts.dialOptions...), - dial.WithDialTimeout(time.Second), + dial.WithDialTimeout(5*time.Second), ), }, append( diff --git a/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/nse_client.go b/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/nse_client.go index ec1e1e0..1200bdb 100644 --- a/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/nse_client.go +++ b/vendor/github.com/networkservicemesh/sdk/pkg/registry/chains/client/nse_client.go @@ -19,6 +19,7 @@ package client import ( "context" + "time" "github.com/networkservicemesh/api/pkg/api/registry" @@ -53,6 +54,7 @@ func NewNetworkServiceEndpointRegistryClient(ctx context.Context, opts ...Option clientconn.NewNetworkServiceEndpointRegistryClient(), dial.NewNetworkServiceEndpointRegistryClient(ctx, dial.WithDialOptions(clientOpts.dialOptions...), + dial.WithDialTimeout(5*time.Second), ), }, append( diff --git a/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/ns_client.go b/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/ns_client.go index b77e9d8..4c852da 100644 --- a/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/ns_client.go +++ b/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/ns_client.go @@ -163,7 +163,7 @@ func (c *dialNSClient) Find(ctx context.Context, in *registry.NetworkServiceQuer // NewNetworkServiceRegistryClient - returns a new null client that does nothing but call next.NetworkServiceRegistryClient(ctx). func NewNetworkServiceRegistryClient(chainCtx context.Context, opts ...Option) registry.NetworkServiceRegistryClient { o := &option{ - dialTimeout: time.Millisecond * 300, + dialTimeout: time.Millisecond * 5000, } for _, opt := range opts { opt(o) diff --git a/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/nse_client.go b/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/nse_client.go index fac7267..fe77dfc 100644 --- a/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/nse_client.go +++ b/vendor/github.com/networkservicemesh/sdk/pkg/registry/common/dial/nse_client.go @@ -163,7 +163,7 @@ func (c *dialNSEClient) Find(ctx context.Context, in *registry.NetworkServiceEnd // NewNetworkServiceEndpointRegistryClient - returns a new null client that does nothing but call next.NetworkServiceEndpointRegistryClient(ctx). func NewNetworkServiceEndpointRegistryClient(chainCtx context.Context, opts ...Option) registry.NetworkServiceEndpointRegistryClient { o := &option{ - dialTimeout: time.Millisecond * 300, + dialTimeout: time.Millisecond * 5000, } for _, opt := range opts { opt(o)