Skip to content

streamline-error-handling-hotpath-improvement#62

Merged
isdaniel merged 1 commit intomainfrom
chore/streamline-error-handling-hotpath-improvement
Apr 29, 2026
Merged

streamline-error-handling-hotpath-improvement#62
isdaniel merged 1 commit intomainfrom
chore/streamline-error-handling-hotpath-improvement

Conversation

@isdaniel
Copy link
Copy Markdown
Owner

  • improve LSN loading with Acquire ordering and enhance WAL message header parsing
  • streamline error handling in BufferReader and LogicalReplicationParser

improve LSN loading with Acquire ordering and enhance WAL message header parsing
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 97.87234% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.74%. Comparing base (c8044ac) to head (f56bd2e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/lsn.rs 96.29% 2 Missing ⚠️
src/stream.rs 97.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   93.68%   93.74%   +0.06%     
==========================================
  Files          10       10              
  Lines       14260    14364     +104     
==========================================
+ Hits        13359    13466     +107     
+ Misses        901      898       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces performance optimizations across the replication module. It refactors error paths in src/buffer.rs and src/protocol.rs into #[cold] functions, removes the skip_message_type method, and optimizes atomic LSN updates in src/lsn.rs to reduce redundant loads. Additionally, src/stream.rs now amortizes connection health checks and uses direct slice access for WAL message decoding. The PR also includes extensive unit and stress tests to ensure the correctness of these optimizations. I have no feedback to provide.

@isdaniel isdaniel merged commit b738aef into main Apr 29, 2026
19 checks passed
@isdaniel isdaniel deleted the chore/streamline-error-handling-hotpath-improvement branch May 4, 2026 09:56
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.

1 participant