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

Config rollback #354

Merged
merged 5 commits into from
Jan 11, 2023
Merged

Conversation

MathieuBordere
Copy link
Contributor

@MathieuBordere MathieuBordere commented Jan 5, 2023

This PR introduces the following changes:

  • Set configuration_uncommitted_index upon startup as we can't know if the configuration is committed or not.

  • Backup the configuration in case the configuration entry is no longer present in the log.

    1. After taking a snapshot and before purging entries from the log.
    2. After installing a snapshot in case the next config needs to be rolled back.
  • Only store committed configurations in a snapshot and not the latest available configuration.

Fixes #250

@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Merging #354 (81421f7) into master (6cdfe67) will increase coverage by 0.20%.
The diff coverage is 80.64%.

❗ Current head 81421f7 differs from pull request most recent head baa8f52. Consider uploading reports for the commit baa8f52 to get more accurate results

@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
+ Coverage   84.01%   84.22%   +0.20%     
==========================================
  Files          50       50              
  Lines        9461     9521      +60     
  Branches     2525     2552      +27     
==========================================
+ Hits         7949     8019      +70     
+ Misses        938      921      -17     
- Partials      574      581       +7     
Impacted Files Coverage Δ
src/replication.c 77.55% <68.18%> (-0.09%) ⬇️
src/membership.c 82.57% <77.77%> (+11.25%) ⬆️
src/start.c 75.42% <80.00%> (-0.31%) ⬇️
src/configuration.c 96.68% <91.30%> (-0.66%) ⬇️
src/raft.c 86.57% <100.00%> (+1.54%) ⬆️
src/snapshot.c 92.59% <100.00%> (+0.28%) ⬆️
src/tick.c 87.36% <0.00%> (+0.49%) ⬆️
src/uv_send.c 89.77% <0.00%> (+1.51%) ⬆️
... and 1 more

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

@MathieuBordere
Copy link
Contributor Author

MathieuBordere commented Jan 6, 2023

Looks to be misbehaving in Jepsen suite with a lot of extra online spare errors. Investigating if it's a fluke or something real.

@MathieuBordere MathieuBordere force-pushed the config-rollback branch 5 times, most recently from 6d1a15a to 3f9596d Compare January 9, 2023 10:27
@MathieuBordere
Copy link
Contributor Author

MathieuBordere commented Jan 9, 2023

Jepsen looks fine now.

@MathieuBordere MathieuBordere marked this pull request as ready for review January 9, 2023 10:29
Copy link
Contributor

@cole-miller cole-miller left a comment

Choose a reason for hiding this comment

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

Looks good!

@MathieuBordere MathieuBordere merged commit 73699a1 into canonical:master Jan 11, 2023
@MathieuBordere MathieuBordere deleted the config-rollback branch January 18, 2023 12:56
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
2 participants