Skip to content

Conversation

@filipecabaco
Copy link
Member

What kind of change does this PR introduce?

  • Properly log out the timeout error on replication connection
  • Improve backoff policy to include exponential backoff to provide more time to db instance to recover

{:error, state}
end

defp calculate_recovery_backoff(attempts) do
Copy link
Member

@edgurgel edgurgel Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind a comment on what's the expected growth on the backoff here?

@blacksmith-sh
Copy link
Contributor

blacksmith-sh bot commented Feb 4, 2026

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test WAL bloat handling track PID changes during WAL bloat creation (Realtime.Integrati
on.RtChannelTest) › Parameters: %{serializer: Phoenix.Socket.V1.JSONSerializer} › test/
integration/
rt_channel_test.exs:2301 › ** (MatchError) no match of right hand side value: %Postgrex
.Result{command: :select, columns: ["active_pid"], rows: [], num_rows: 0, connection_id
: 1151, messages: []} › code: %{rows: [[new_db_pid]]} = Postgrex.query!(db_conn, active
_slot_query, [])/stacktrace
View Logs
test WAL bloat handling track PID changes during WAL bloat creation (Realtime.Integrati
on.RtChannelTest) › Parameters: %{serializer: RealtimeWeb.Socket.V2Serializer} › test/
integration/
rt_channel_test.exs:2301 › ** (MatchError) no match of right hand side value: %Postgrex
.Result{command: :select, columns: ["active_pid"], rows: [], num_rows: 0, connection_id
: 1533, messages: []} › code: %{rows: [[new_db_pid]]} = Postgrex.query!(db_conn, active
_slot_query, [])/stacktrace
View Logs

Fix in Cursor

Comment on lines +388 to +389
%{num_rows: _} ->
{:noreply, %{state | backoff: Backoff.reset(backoff)}}
Copy link
Member

@edgurgel edgurgel Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if we got num_rows different than 0 but this Connect proces does not own the ReplicationConnection process what does this mean in the end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants