Skip to content

khepri_machine: Use cached leader for #dedup_ack{}#355

Merged
dumbbell merged 1 commit into
v0.17.xfrom
use-cached-leader
Feb 3, 2026
Merged

khepri_machine: Use cached leader for #dedup_ack{}#355
dumbbell merged 1 commit into
v0.17.xfrom
use-cached-leader

Conversation

@mkuratczyk
Copy link
Copy Markdown
Contributor

@mkuratczyk mkuratczyk commented Jan 28, 2026

Send the DedupAck command directly to the leader.
This prevents forwards that are then logged every time (follower leader cast - redirecting to ...)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.55%. Comparing base (d048f05) to head (d661fb5).
⚠️ Report is 2 commits behind head on v0.17.x.

Files with missing lines Patch % Lines
src/khepri_machine.erl 50.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           v0.17.x     #355      +/-   ##
===========================================
- Coverage    86.62%   86.55%   -0.08%     
===========================================
  Files           22       22              
  Lines         3514     3517       +3     
===========================================
  Hits          3044     3044              
- Misses         470      473       +3     
Flag Coverage Δ
erlang-26 86.23% <50.00%> (-0.33%) ⬇️
erlang-27 86.52% <50.00%> (+0.23%) ⬆️
erlang-28 86.52% <50.00%> (+0.21%) ⬆️
os-ubuntu-latest 86.55% <50.00%> (-0.08%) ⬇️
os-windows-latest 86.26% <50.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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
Collaborator

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

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

Could you please rebase your patch on to the v0.17.x branch?

Otherwise, it looks good to me, thank you!

@mkuratczyk mkuratczyk changed the base branch from main to v0.17.x February 3, 2026 10:16
[Why]
Everywhere else, we query the cached leader and use it to send a command
directly to it. This optimisation was missing when sending the
`#dedup_ack{}` command.
@dumbbell dumbbell changed the title khepri_machine: use cached leader for DedupAck khepri_machine: use cached leader for #dedup_ack{} Feb 3, 2026
@dumbbell dumbbell merged commit 0666e83 into v0.17.x Feb 3, 2026
26 checks passed
@dumbbell dumbbell deleted the use-cached-leader branch February 3, 2026 11:01
@dumbbell dumbbell modified the milestones: v0.17.6, v0.17.5 Feb 4, 2026
@dumbbell dumbbell self-assigned this Feb 4, 2026
@dumbbell dumbbell changed the title khepri_machine: use cached leader for #dedup_ack{} khepri_machine: Use cached leader for #dedup_ack{} Feb 4, 2026
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.

4 participants