Skip to content

Commit 92e7b59

Browse files
authored
fix: set a lower fullsweep_after flag for GenRpcPubSub workers (#1551)
1 parent 748398c commit 92e7b59

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

lib/realtime/gen_rpc/pub_sub.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ defmodule Realtime.GenRpcPubSub.Worker do
6767
@impl true
6868
def init(pubsub) do
6969
Process.flag(:message_queue_data, :off_heap)
70+
Process.flag(:fullsweep_after, 1000)
7071
{:ok, pubsub}
7172
end
7273

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
44
def project do
55
[
66
app: :realtime,
7-
version: "2.51.8",
7+
version: "2.51.9",
88
elixir: "~> 1.17.3",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,

test/realtime/gen_rpc_pub_sub_test.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ defmodule Realtime.GenRpcPubSubTest do
99
|> Process.whereis()
1010
|> Process.info(:message_queue_data) == {:message_queue_data, :off_heap}
1111
end
12+
13+
test "it sets fullsweep_after flag on the workers" do
14+
assert Realtime.PubSubElixir.Realtime.PubSub.Adapter_1
15+
|> Process.whereis()
16+
|> Process.info(:fullsweep_after) == {:fullsweep_after, 1000}
17+
end
1218
end

0 commit comments

Comments
 (0)