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

raft: Plug pseudo-random number generator #55

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

freeekanayaka
Copy link
Member

This plugs the internal PRNG into struct raft. For now the generator is seeded using struct raft_io->random(), but eventually it will be consumer's responsibility to initialize it.

Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Patch coverage: 93.93% and project coverage change: -0.01% ⚠️

Comparison is base (330db74) 75.22% compared to head (ccd6415) 75.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   75.22%   75.22%   -0.01%     
==========================================
  Files          51       51              
  Lines        8964     8992      +28     
  Branches     2215     2220       +5     
==========================================
+ Hits         6743     6764      +21     
- Misses        987      992       +5     
- Partials     1234     1236       +2     
Files Changed Coverage Δ
src/fixture.c 91.02% <92.59%> (+0.01%) ⬆️
src/election.c 78.91% <100.00%> (ø)
src/raft.c 77.24% <100.00%> (+0.64%) ⬆️

... and 1 file with indirect coverage changes

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

@freeekanayaka freeekanayaka merged commit e35d5c7 into cowsql:main Sep 15, 2023
@freeekanayaka freeekanayaka deleted the plug-prng branch September 15, 2023 13:21
@freeekanayaka freeekanayaka changed the title raft: Plug pseudor-random number generator raft: Plug pseudo-random number generator Sep 15, 2023
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