Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

khepri_cluster: Use ra_leaderboard first to query members locally #240

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

dumbbell
Copy link
Member

@dumbbell dumbbell commented Jan 5, 2024

Why

A call to ra_leaderboard:lookup_members/1 will be faster if it has the answer compared to a Ra server query.

How

If it doesn't know the list of members, we fall back to the Ra server query.

@dumbbell dumbbell added the enhancement New feature or request label Jan 5, 2024
@dumbbell dumbbell added this to the v0.11.0 milestone Jan 5, 2024
@dumbbell dumbbell self-assigned this Jan 5, 2024
@kjnilsson
Copy link

Ra 2.7.2 is released with the ra leaderboard fixes.

https://hex.pm/packages/ra

[Why]
A call to `ra_leaderboard:lookup_members/1` will be faster if it has the
answer compared to a Ra server query.

[How]
If it doesn't know the list of members, we fall back to the Ra server
query.
@dumbbell dumbbell force-pushed the use-ra_leaderboard-to-query-members-locally branch from 4f9eb71 to fa97fad Compare January 12, 2024 12:05
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0089ccc) 88.86% compared to head (fa97fad) 88.80%.

Files Patch % Lines
src/khepri_cluster.erl 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
- Coverage   88.86%   88.80%   -0.07%     
==========================================
  Files          20       20              
  Lines        2893     2895       +2     
==========================================
  Hits         2571     2571              
- Misses        322      324       +2     
Flag Coverage Δ
erlang-24 87.70% <50.00%> (-0.13%) ⬇️
erlang-25 87.73% <50.00%> (-0.03%) ⬇️
erlang-26 88.46% <50.00%> (-0.03%) ⬇️
os-ubuntu-latest 88.77% <50.00%> (+0.07%) ⬆️
os-windows-latest 88.53% <50.00%> (-0.07%) ⬇️

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.

@dumbbell dumbbell marked this pull request as ready for review January 12, 2024 12:09
@dumbbell dumbbell merged commit f1f6dda into main Jan 12, 2024
12 checks passed
@dumbbell dumbbell deleted the use-ra_leaderboard-to-query-members-locally branch January 12, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants