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

Issue 250/membership rollback #329

Conversation

MathieuBordere
Copy link
Contributor

@MathieuBordere MathieuBordere commented Nov 23, 2022

Fixes #250.

The fix ensures the log entry containing the uncommitted config entry is still present in case it has to be rolled back.

Draft: Investigating if this could lead to some form of "snapshot starvation" where a snapshot would never be taken when the config is being changed constantly.

Edit: I think it's possible to never take a snapshot with this addition to the code. The proper fix would be to keep a copy of the last committed configuration around and add that one to the snapshot. This again brings up the problem of the Raft API update #303 , because keeping a copy around will increase the size of struct raft.

Edit2: We can probably work around the API limitation (for now), we could probably get the last committed config from the log if it's still there, and if it's not, we could get it from the previous snapshot. One of the 2 has to succeed.

Mathieu Borderé added 2 commits November 23, 2022 11:57
Signed-off-by: Mathieu Borderé <mathieu.bordere@canonical.com>
Signed-off-by: Mathieu Borderé <mathieu.bordere@canonical.com>
@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #329 (c602204) into master (5637dcf) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
- Coverage   83.97%   83.96%   -0.02%     
==========================================
  Files          50       50              
  Lines        9400     9403       +3     
  Branches     2508     2509       +1     
==========================================
+ Hits         7894     7895       +1     
- Misses        949      950       +1     
- Partials      557      558       +1     
Impacted Files Coverage Δ
src/replication.c 77.61% <50.00%> (-0.07%) ⬇️
src/snapshot.c 92.45% <100.00%> (+0.14%) ⬆️
src/fixture.c 93.82% <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.

@MathieuBordere MathieuBordere marked this pull request as draft November 23, 2022 12:05
@MathieuBordere MathieuBordere deleted the issue_250/membership_rollback branch December 9, 2022 10:23
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.

membership rollback issue
1 participant