Skip to content

Commit

Permalink
perf: increase max pending buffer length (#2125)
Browse files Browse the repository at this point in the history
* perf: increase max pending buffer length

* chore: fix failing tests
  • Loading branch information
Ziinc authored Jul 5, 2024
1 parent 964d8b7 commit d178759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/logflare/backends.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule Logflare.Backends do

defdelegate child_spec(arg), to: __MODULE__.Supervisor

@max_pending_buffer_len 7_500
@max_pending_buffer_len 15_000

@doc """
Retrieves the hardcoded max pending buffer length.
Expand Down
2 changes: 1 addition & 1 deletion test/logflare_web/plugs/buffer_limiter_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule LogflareWeb.Plugs.BufferLimiterTest do
end

test "if buffer is full of pending, return 429", %{conn: conn, source: source} do
for _ <- 1..8_000 do
for _ <- 1..20_000 do
le = build(:log_event)
IngestEventQueue.add_to_table({source, nil}, [le])
end
Expand Down

0 comments on commit d178759

Please sign in to comment.