Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

tick: Don't convert to candidate while a snapshot is installing #353

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

cole-miller
Copy link
Contributor

Closes #343. @MathieuBordere, let me know if this wasn't what you had in mind, I'm sure there are other possible approaches.

Signed-off-by: Cole Miller cole.miller@canonical.com

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Merging #353 (4fbd3c0) into master (3c69054) will decrease coverage by 0.03%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master     #353      +/-   ##
==========================================
- Coverage   84.08%   84.05%   -0.04%     
==========================================
  Files          50       50              
  Lines        9454     9461       +7     
  Branches     2521     2525       +4     
==========================================
+ Hits         7949     7952       +3     
- Misses        934      935       +1     
- Partials      571      574       +3     
Impacted Files Coverage Δ
src/tick.c 86.86% <75.00%> (-0.50%) ⬇️
src/replication.c 77.52% <100.00%> (-0.16%) ⬇️
src/fixture.c 94.62% <0.00%> (-0.10%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cole-miller
Copy link
Contributor Author

I'll try to add a test for this.

@MathieuBordere
Copy link
Contributor

I'll try to add a test for this.

Looks good to me, a test would be nice indeed, you could mess with the IO latency and election timeout in the test to hit this case.

@cole-miller
Copy link
Contributor Author

Hmm, having a lot of trouble shortening the election timeout in the test to hit that new code path

@cole-miller cole-miller marked this pull request as ready for review January 5, 2023 19:50
@cole-miller
Copy link
Contributor Author

Hmm, having a lot of trouble shortening the election timeout in the test to hit that new code path

Got it! This should be ready to go.

Signed-off-by: Cole Miller <cole.miller@canonical.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate RAFT_FOLLOWER moving to RAFT_CANDIDATE during snapshot installation.
2 participants