From 3037925b714fe7941d8c04ba618454a5c8f2ec9d Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 6 May 2024 14:03:31 +0800 Subject: [PATCH] perf(webapi): Increase maxWorkers limit to 10000 (#5326) Signed-off-by: Kevin Su --- flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go | 2 +- .../go/tasks/pluginmachinery/internal/webapi/core_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go index 1d0e31f71c7..47d839ec25a 100644 --- a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go +++ b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go @@ -21,7 +21,7 @@ const ( minCacheSize = 10 maxCacheSize = 500000 minWorkers = 1 - maxWorkers = 100 + maxWorkers = 10000 minSyncDuration = 5 * time.Second maxSyncDuration = time.Hour minBurst = 5 diff --git a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core_test.go b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core_test.go index 65d90a6c7e5..fe3fc693220 100644 --- a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core_test.go @@ -52,7 +52,7 @@ func Test_validateConfig(t *testing.T) { err := validateConfig(cfg) assert.Error(t, err) - assert.Equal(t, "\ncache size is expected to be between 10 and 500000. Provided value is 0\nworkers count is expected to be between 1 and 100. Provided value is 0\nresync interval is expected to be between 5 and 3600. Provided value is 0\nread burst is expected to be between 5 and 10000. Provided value is 0\nread qps is expected to be between 1 and 100000. Provided value is 0\nwrite burst is expected to be between 5 and 10000. Provided value is 0\nwrite qps is expected to be between 1 and 100000. Provided value is 0", err.Error()) + assert.Equal(t, "\ncache size is expected to be between 10 and 500000. Provided value is 0\nworkers count is expected to be between 1 and 10000. Provided value is 0\nresync interval is expected to be between 5 and 3600. Provided value is 0\nread burst is expected to be between 5 and 10000. Provided value is 0\nread qps is expected to be between 1 and 100000. Provided value is 0\nwrite burst is expected to be between 5 and 10000. Provided value is 0\nwrite qps is expected to be between 1 and 100000. Provided value is 0", err.Error()) }) t.Run("Above max", func(t *testing.T) { @@ -74,7 +74,7 @@ func Test_validateConfig(t *testing.T) { err := validateConfig(cfg) assert.Error(t, err) - assert.Equal(t, "\ncache size is expected to be between 10 and 500000. Provided value is 1000000000\nworkers count is expected to be between 1 and 100. Provided value is 1000000000\nresync interval is expected to be between 5 and 3600. Provided value is 3.6e+07\nread burst is expected to be between 5 and 10000. Provided value is 1000000\nwrite burst is expected to be between 5 and 10000. Provided value is 1000000", err.Error()) + assert.Equal(t, "\ncache size is expected to be between 10 and 500000. Provided value is 1000000000\nworkers count is expected to be between 1 and 10000. Provided value is 1000000000\nresync interval is expected to be between 5 and 3600. Provided value is 3.6e+07\nread burst is expected to be between 5 and 10000. Provided value is 1000000\nwrite burst is expected to be between 5 and 10000. Provided value is 1000000", err.Error()) }) }