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

Refactor/error handling curp and client #480

Conversation

Phoenix500526
Copy link
Collaborator

Please briefly answer these questions:
Refactor the error-handling logic in Curp module and its client. FYI: #463

  • what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)

  • what changes does this pull request make?

  • are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)

@Phoenix500526 Phoenix500526 marked this pull request as draft October 11, 2023 03:16
@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch 2 times, most recently from e3cdf34 to 392e2ce Compare October 11, 2023 03:58
@Phoenix500526 Phoenix500526 marked this pull request as ready for review October 11, 2023 05:37
@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch 2 times, most recently from 6b3642d to 385c4d2 Compare October 11, 2023 07:51
@xline-kv xline-kv deleted a comment from codecov bot Oct 11, 2023
@xline-kv xline-kv deleted a comment from codecov bot Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 278 lines in your changes are missing coverage. Please review.

Comparison is base (aa83ea0) 54.23% compared to head (0f3f494) 54.06%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #480      +/-   ##
==========================================
- Coverage   54.23%   54.06%   -0.18%     
==========================================
  Files         101      101              
  Lines       17872    17918      +46     
  Branches    17872    17918      +46     
==========================================
- Hits         9693     9687       -6     
- Misses       7599     7656      +57     
+ Partials      580      575       -5     
Files Coverage Δ
benchmark/src/bench_client.rs 0.00% <ø> (ø)
curp-external-api/src/cmd.rs 16.21% <ø> (ø)
curp/src/server/cmd_worker/mod.rs 72.41% <ø> (ø)
curp/src/server/mod.rs 9.09% <ø> (+0.15%) ⬆️
curp/src/server/raw_curp/tests.rs 73.93% <ø> (ø)
xline-client/src/clients/cluster.rs 0.00% <ø> (ø)
xline-client/src/clients/kv.rs 0.00% <ø> (ø)
xline-client/src/clients/lock.rs 0.00% <0.00%> (ø)
xline-client/src/clients/maintenance.rs 0.00% <0.00%> (ø)
xline-client/src/types/lease.rs 0.00% <0.00%> (ø)
... and 23 more

... and 4 files with indirect coverage changes

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

@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch 2 times, most recently from f3d4c5b to 491b55a Compare October 11, 2023 09:06
@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch 5 times, most recently from e6979aa to 7a3ef92 Compare October 17, 2023 01:20
@Phoenix500526 Phoenix500526 linked an issue Oct 17, 2023 that may be closed by this pull request
curp/src/rpc/mod.rs Outdated Show resolved Hide resolved
curp/src/client.rs Outdated Show resolved Hide resolved
curp/tests/server.rs Outdated Show resolved Hide resolved
@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch 2 times, most recently from c969695 to ad2f80e Compare October 19, 2023 08:36
@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch 3 times, most recently from 5f05bbf to 6cbd057 Compare October 19, 2023 09:08
iGxnon
iGxnon previously approved these changes Oct 20, 2023
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!

@bsbds
Copy link
Collaborator

bsbds commented Oct 20, 2023

Please add a test to cover the conversion between error types and tonic status.

curp/src/error.rs Outdated Show resolved Hide resolved
curp/src/rpc/connect.rs Outdated Show resolved Hide resolved
curp/src/rpc/mod.rs Outdated Show resolved Hide resolved
curp/src/server/curp_node.rs Outdated Show resolved Hide resolved
curp/src/client.rs Outdated Show resolved Hide resolved
@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch from a0f5229 to daec800 Compare October 20, 2023 07:26
Copy link
Collaborator

@themanforfree themanforfree left a comment

Choose a reason for hiding this comment

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

LGTM

@Phoenix500526 Phoenix500526 force-pushed the refactor/error-handling-curp-and-client branch from 331f85f to 0f3f494 Compare October 23, 2023 02:22
@Phoenix500526 Phoenix500526 merged commit ac7e7ce into xline-kv:master Oct 23, 2023
16 of 18 checks passed
@Phoenix500526 Phoenix500526 deleted the refactor/error-handling-curp-and-client branch October 23, 2023 03:13
@Phoenix500526 Phoenix500526 added the Improvement Refactor or optimization, including process, performance or something like that label Nov 18, 2023
@Phoenix500526 Phoenix500526 added this to the v0.6.0 milestone Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Refactor or optimization, including process, performance or something like that
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor the error-handling logic of Xline
4 participants