8000 fix(portal): acknowledge WAL change_logs received data by bmanifold · Pull Request #11896 · firezone/firezone · GitHub
[go: up one dir, main page]

Skip to con 10000 tent

Conversation

@bmanifold
Copy link
Collaborator

No description provided.

@bmanifold bmanifold requested a review from jamilbk January 27, 2026 08:33
@vercel
Copy link
vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
firezone Ready Ready Preview, Comment Jan 28, 2026 9:34pm

Request Review

@jamilbk jamilbk changed the title fix(portal): replication cpu usage fix(portal): acknowledge WAL change_logs received data Jan 27, 2026
Copy link
Member
@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

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

Just a few minor things, otherwise LGTM

@jamilbk
Copy link
Member
jamilbk commented Jan 28, 2026

@bmanifold Did we want to get this merged to soak test on staging?

@bmanifold bmanifold force-pushed the fix/portal-replication-cpu-usage branch from 0dd03db to c142861 Compare January 28, 2026 21:26
@bmanifold bmanifold marked this pull request as ready for review January 28, 2026 21:26
Copilot AI review requested due to automatic review settings January 28, 2026 21:26
Copy link
Contributor
Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the PostgreSQL replication acknowledgment logic to properly distinguish between received and flushed WAL (Write-Ahead Log) data in buffered mode, preventing unnecessary KeepAlive message floods from the server.

Changes:

  • Updated WAL acknowledgment logic to separately track received vs. persisted data positions
  • Added application_name parameters to database connection configs for better monitoring
  • Updated Sobelow security skip hashes to reflect config changes

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
elixir/lib/portal/replication/connection.ex Implements proper WAL position tracking by sending separate write/flush LSNs to PostgreSQL
elixir/config/config.exs Adds application_name parameters to all database connections for improved observability
elixir/.sobelow-skips Updates security skip hashes affected by config file modifications

@bmanifold
Copy link
Collaborator Author

@bmanifold Did we want to get this merged to soak test on staging?

Yeah, apologies. Was wanting to test if that size > 0 check was needed or not, but have been busy with other things today. Just addressed all the feedback and marked the PR to be merged when ready.

@bmanifold bmanifold added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit 505ac1e Jan 28, 2026
97 checks passed
@bmanifold bmanifold deleted the fix/portal-replication-cpu-usage branch January 28, 2026 21:58
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

0