From c421ff50e02648537a8d1733d72d0925701f7d91 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Tue, 5 Nov 2024 00:22:58 +0800 Subject: [PATCH 1/2] perf: adds fullsweep_after to search query executor --- lib/logflare/logs/search/logs_search_query_executor.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/logflare/logs/search/logs_search_query_executor.ex b/lib/logflare/logs/search/logs_search_query_executor.ex index 74b5abb66..7cc1b563b 100644 --- a/lib/logflare/logs/search/logs_search_query_executor.ex +++ b/lib/logflare/logs/search/logs_search_query_executor.ex @@ -28,7 +28,11 @@ defmodule Logflare.Logs.SearchQueryExecutor do # API def start_link(args) do source = Keyword.get(args, :source) - GenServer.start_link(__MODULE__, args, name: Backends.via_source(source, __MODULE__)) + + GenServer.start_link(__MODULE__, args, + spawn_opt: [fullsweep_after: 1_000], + name: Backends.via_source(source, __MODULE__) + ) end @impl true From e62f9c2c9caad8f1742ed06dd7dcda28cdd0cfa9 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Thu, 7 Nov 2024 15:24:38 +0800 Subject: [PATCH 2/2] perf: increase fullsweep_after to 5k --- lib/logflare/logs/search/logs_search_query_executor.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logflare/logs/search/logs_search_query_executor.ex b/lib/logflare/logs/search/logs_search_query_executor.ex index 7cc1b563b..437ee1b1f 100644 --- a/lib/logflare/logs/search/logs_search_query_executor.ex +++ b/lib/logflare/logs/search/logs_search_query_executor.ex @@ -30,7 +30,7 @@ defmodule Logflare.Logs.SearchQueryExecutor do source = Keyword.get(args, :source) GenServer.start_link(__MODULE__, args, - spawn_opt: [fullsweep_after: 1_000], + spawn_opt: [fullsweep_after: 5_000], name: Backends.via_source(source, __MODULE__) ) end