Skip to content

Commit 9a752ee

Browse files
authored
fix: Listen and ReplicationConnection supervisor setup (#1438)
* fix: Listen and ReplicationConnection supervisor setup Use the same amount of partitions that Connect has given that they map 1:1 Also move ReplicationConnection and Listen supervisors above Connect as they need to be up and running before Connect can start * chore: document CONNECT_PARTITION_SLOTS It's already used on config/runtime.exs
1 parent f2bef31 commit 9a752ee

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ If you're using the default tenant, the URL is `ws://realtime-dev.localhost:4000
160160
| JANITOR_CLEANUP_CHILDREN_TIMEOUT | number | Timeout for each async task for janitor cleanup |
161161
| JANITOR_CHUNK_SIZE | number | Number of tenants to process per chunk. Each chunk will be processed by a Task |
162162
| MIGRATION_PARTITION_SLOTS | number | Number of dynamic supervisor partitions used by the migrations process |
163+
| CONNECT_PARTITION_SLOTS | number | Number of dynamic supervisor partitions used by the Connect, ReplicationConnect and Listen processes |
163164
| METRICS_CLEANER_SCHEDULE_TIMER_IN_MS | number | Time in ms to run the Metric Cleaner task |
164165
| REQUEST_ID_BAGGAGE_KEY | string | OTEL Baggage key to be used as request id |
165166
| OTEL_SDK_DISABLED | boolean | Disable OpenTelemetry tracing completely when 'true' |

lib/realtime/application.ex

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,18 @@ defmodule Realtime.Application do
8686
{PartitionSupervisor,
8787
child_spec: DynamicSupervisor,
8888
strategy: :one_for_one,
89-
name: Connect.DynamicSupervisor,
89+
name: ReplicationConnection.DynamicSupervisor,
90+
partitions: connect_partition_slots},
91+
{PartitionSupervisor,
92+
child_spec: DynamicSupervisor,
93+
strategy: :one_for_one,
94+
name: Listen.DynamicSupervisor,
9095
partitions: connect_partition_slots},
9196
{PartitionSupervisor,
92-
child_spec: DynamicSupervisor, strategy: :one_for_one, name: ReplicationConnection.DynamicSupervisor},
93-
{PartitionSupervisor, child_spec: DynamicSupervisor, strategy: :one_for_one, name: Listen.DynamicSupervisor},
97+
child_spec: DynamicSupervisor,
98+
strategy: :one_for_one,
99+
name: Connect.DynamicSupervisor,
100+
partitions: connect_partition_slots},
94101
RealtimeWeb.Endpoint,
95102
RealtimeWeb.Presence
96103
] ++ extensions_supervisors() ++ janitor_tasks()

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.57.10",
7+
version: "2.57.11",
88
elixir: "~> 1.17.3",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,

0 commit comments

Comments
 (0)