From 323e6c9944819fd5a649dc4d02e01f77e07be07f Mon Sep 17 00:00:00 2001 From: "e.martyn" Date: Mon, 18 Sep 2023 14:42:48 +0300 Subject: [PATCH] [igp] increase ServerWithMaxInflightPackets --- internal/aggregator/ingress_proxy.go | 2 +- internal/metadata/rpc_handler_test.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/aggregator/ingress_proxy.go b/internal/aggregator/ingress_proxy.go index ed6402471..2eb6311ac 100644 --- a/internal/aggregator/ingress_proxy.go +++ b/internal/aggregator/ingress_proxy.go @@ -97,7 +97,7 @@ func RunIngressProxy(sh2 *agent.Agent, aesPwd string, config ConfigIngressProxy) rpc.ServerWithTrustedSubnetGroups(build.TrustedSubnetGroups()), rpc.ServerWithVersion(build.Info()), rpc.ServerWithDefaultResponseTimeout(data_model.MaxConveyorDelay*time.Second), - rpc.ServerWithMaxInflightPackets((data_model.MaxConveyorDelay+data_model.MaxHistorySendStreams)*3), // see server settings in aggregator + rpc.ServerWithMaxInflightPackets((data_model.MaxConveyorDelay+data_model.MaxHistorySendStreams)*3*30), // see server settings in aggregator rpc.ServerWithMaxWorkers(128<<10), rpc.ServerWithResponseBufSize(1024), rpc.ServerWithResponseMemEstimate(1024), diff --git a/internal/metadata/rpc_handler_test.go b/internal/metadata/rpc_handler_test.go index b83fcd0fb..cb17c364b 100644 --- a/internal/metadata/rpc_handler_test.go +++ b/internal/metadata/rpc_handler_test.go @@ -32,14 +32,15 @@ func initServer(t *testing.T, now func() time.Time) (net.Listener, *rpc.Server, handler := NewHandler(db, "abc", log.Printf) proxy := ProxyHandler{} h := tlmetadata.Handler{ - RawGetMapping: proxy.HandleProxy("", handler.RawGetMappingByValue), - RawGetInvertMapping: proxy.HandleProxy("", handler.RawGetMappingByID), - RawEditEntitynew: proxy.HandleProxy("", handler.RawEditEntity), - RawGetJournalnew: proxy.HandleProxy("", handler.RawGetJournal), + RawGetMapping: proxy.HandleProxy("", handler.RawGetMappingByValue), + RawGetInvertMapping: proxy.HandleProxy("", handler.RawGetMappingByID), + RawEditEntitynew: proxy.HandleProxy("", handler.RawEditEntity), + PutTagMappingBootstrap: handler.PutTagMappingBootstrap, GetTagMappingBootstrap: handler.GetTagMappingBootstrap, } - server := rpc.NewServer(rpc.ServerWithHandler(h.Handle), rpc.ServerWithLogf(log.Printf)) + sh := tlmetadata.Handler{RawGetJournalnew: proxy.HandleProxy("", handler.RawGetJournal)} + server := rpc.NewServer(rpc.ServerWithHandler(h.Handle), rpc.ServerWithSyncHandler(sh.Handle), rpc.ServerWithLogf(log.Printf)) t.Cleanup(func() { server.Close() })