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

feature: add apply_conf_change method for RawCurp #433

Merged
merged 4 commits into from
Sep 20, 2023

Conversation

themanforfree
Copy link
Collaborator

Please briefly answer these questions:
#306

  • what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)
    apply config change to curp
  • what changes does this pull request make?
    refactor data structures via DashMap, and modify them when apply_conf_change
  • are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)
    no

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage: 72.58% and project coverage change: +0.27% 🎉

Comparison is base (7a01496) 54.02% compared to head (4437b4b) 54.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   54.02%   54.29%   +0.27%     
==========================================
  Files         102      102              
  Lines       17199    17378     +179     
  Branches    17199    17378     +179     
==========================================
+ Hits         9291     9436     +145     
- Misses       7341     7369      +28     
- Partials      567      573       +6     
Files Changed Coverage Δ
curp/src/error.rs 54.19% <0.00%> (-0.42%) ⬇️
curp/src/server/curp_node.rs 22.38% <0.00%> (-0.21%) ⬇️
curp/src/server/mod.rs 0.00% <0.00%> (ø)
xline/src/server/lease_server.rs 0.00% <0.00%> (ø)
xline/src/server/xline_server.rs 0.00% <0.00%> (ø)
curp/src/server/raw_curp/mod.rs 69.08% <74.71%> (+0.54%) ⬆️
curp/src/rpc/mod.rs 27.65% <75.00%> (+5.61%) ⬆️
curp/src/server/raw_curp/tests.rs 69.72% <75.00%> (+0.93%) ⬆️
curp/src/members.rs 88.12% <82.35%> (+4.03%) ⬆️
curp/src/server/raw_curp/state.rs 94.08% <93.93%> (+0.88%) ⬆️

... and 2 files with indirect coverage changes

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

curp/src/server/raw_curp/state.rs Outdated Show resolved Hide resolved
curp/src/server/raw_curp/state.rs Outdated Show resolved Hide resolved
curp/src/server/curp_node.rs Outdated Show resolved Hide resolved
curp/src/server/raw_curp/mod.rs Outdated Show resolved Hide resolved
@themanforfree themanforfree force-pushed the apply_conf_change branch 3 times, most recently from e3ab157 to d28e825 Compare September 8, 2023 03:41
curp/proto/message.proto Show resolved Hide resolved
curp/src/members.rs Outdated Show resolved Hide resolved
curp/src/members.rs Outdated Show resolved Hide resolved
curp/src/server/curp_node.rs Show resolved Hide resolved
curp/src/server/raw_curp/tests.rs Outdated Show resolved Hide resolved
curp/src/server/raw_curp/tests.rs Show resolved Hide resolved
curp/proto/message.proto Outdated Show resolved Hide resolved
curp/src/server/raw_curp/mod.rs Show resolved Hide resolved
curp/src/server/curp_node.rs Show resolved Hide resolved
curp/src/server/cmd_worker/mod.rs Outdated Show resolved Hide resolved
@iGxnon
Copy link
Contributor

iGxnon commented Sep 11, 2023

BTW, can we directly use the etcd's protobuf definition of ConfChange? This way, we won't need to add an extra layer of translation in xline to the current definition of ConfChange.

curp/src/rpc/mod.rs Outdated Show resolved Hide resolved
curp/src/rpc/mod.rs Outdated Show resolved Hide resolved
curp/src/server/cmd_worker/mod.rs Outdated Show resolved Hide resolved
curp/src/server/raw_curp/mod.rs Outdated Show resolved Hide resolved
curp/src/server/raw_curp/mod.rs Outdated Show resolved Hide resolved
curp/src/server/raw_curp/mod.rs Show resolved Hide resolved
curp/src/server/raw_curp/state.rs Outdated Show resolved Hide resolved
refactor data structures that need to be mutable

Signed-off-by: themanforfree <themanforfree@gmail.com>
Signed-off-by: themanforfree <themanforfree@gmail.com>
Signed-off-by: themanforfree <themanforfree@gmail.com>
Signed-off-by: themanforfree <themanforfree@gmail.com>
Copy link
Collaborator

@Phoenix500526 Phoenix500526 left a comment

Choose a reason for hiding this comment

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

This PR should be based on PR #451 and PR xline-kv/curp-proto#2

Copy link
Contributor

@iGxnon iGxnon left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Phoenix500526 Phoenix500526 left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit 78109d7 into xline-kv:master Sep 20, 2023
17 checks passed
@themanforfree themanforfree deleted the apply_conf_change branch September 20, 2023 09:56
@Phoenix500526 Phoenix500526 added this to the v0.6.0 milestone Nov 18, 2023
@Phoenix500526 Phoenix500526 added the enhancement New feature or request label Nov 18, 2023
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.

5 participants