Skip to content

Commit 9d32a33

Browse files
committed
Use consistent prefix ELECTRIC_REPLICATION_IDLE for the new configuration opts
1 parent 7314c01 commit 9d32a33

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.changeset/little-seas-guess.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'@core/sync-service': patch
33
---
44

5-
Add two new configuration options for periodic retained WAL size checks in scaled down mode: ELECTRIC_IDLE_WAL_SIZE_CHECK_PERIOD and ELECTRIC_IDLE_WAL_SIZE_THRESHOLD.
5+
Add two new configuration options for periodic retained WAL size checks in scaled down mode: ELECTRIC_REPLICATION_IDLE_WAL_SIZE_CHECK_PERIOD and ELECTRIC_REPLICATION_IDLE_WAL_SIZE_THRESHOLD.

integration-tests/tests/wal-size-check-while-scaled-down.lux

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# Start Electric and wait for it to finish initialization.
3333
# Have to disable the ConnectionManagerPing process, otherwise it will error when
3434
# Connection.Manager itself goes down as part of the test scenario.
35-
[invoke setup_electric_with_env "DO_NOT_START_CONN_MAN_PING=true ELECTRIC_IDLE_WAL_SIZE_CHECK_PERIOD=1s ELECTRIC_IDLE_WAL_SIZE_THRESHOLD=10000"]
35+
[invoke setup_electric_with_env "DO_NOT_START_CONN_MAN_PING=true ELECTRIC_REPLICATION_IDLE_WAL_SIZE_CHECK_PERIOD=1s ELECTRIC_REPLICATION_IDLE_WAL_SIZE_THRESHOLD=10000"]
3636
[shell electric]
3737
[timeout 10]
3838
??[debug] Replication client started streaming
@@ -56,14 +56,14 @@
5656
??(0 rows)
5757

5858

59-
# Sleep until it's time to verify that Electric has checked retained WAL size in Postgres after ELECTRIC_IDLE_WAL_SIZE_CHECK_PERIOD
59+
# Sleep until it's time to verify that Electric has checked retained WAL size in Postgres after ELECTRIC_REPLICATION_IDLE_WAL_SIZE_CHECK_PERIOD
6060
[shell electric]
6161
[sleep 2]
6262

6363
??Opening a database connection to check the retained WAL size
6464
?Retained WAL size [0-9]+B is below the threshold of ~10\.0KB\. Scheduling the next check to take place after 1sec
6565

66-
# Write to the database enough data to force the retained WAL size to go over ELECTRIC_IDLE_WAL_SIZE_THRESHOLD
66+
# Write to the database enough data to force the retained WAL size to go over ELECTRIC_REPLICATION_IDLE_WAL_SIZE_THRESHOLD
6767
[shell psql]
6868
!insert into items select * from generate_series(1,1000);
6969
??INSERT

packages/sync-service/config/runtime.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ config :electric,
275275
),
276276
idle_wal_size_check_period:
277277
env!(
278-
"ELECTRIC_IDLE_WAL_SIZE_CHECK_PERIOD",
278+
"ELECTRIC_REPLICATION_IDLE_WAL_SIZE_CHECK_PERIOD",
279279
&Electric.Config.parse_human_readable_time!/1,
280280
nil
281281
),
282-
idle_wal_size_threshold: env!("ELECTRIC_IDLE_WAL_SIZE_THRESHOLD", :integer, nil)
282+
idle_wal_size_threshold: env!("ELECTRIC_REPLICATION_IDLE_WAL_SIZE_THRESHOLD", :integer, nil)
283283

284284
if Electric.telemetry_enabled?() do
285285
# Disable the default telemetry_poller process since we start our own in

0 commit comments

Comments
 (0)