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: execution error types #399

Merged
merged 7 commits into from
Aug 3, 2023

Conversation

bsbds
Copy link
Collaborator

@bsbds bsbds commented Jul 26, 2023

Described in: #397

Please briefly answer these questions:

  • 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)

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 10.25% and project coverage change: +0.10% 🎉

Comparison is base (0789ec3) 52.34% compared to head (879d3ec) 52.44%.

❗ Current head 879d3ec differs from pull request most recent head 54d7f8c. Consider uploading reports for the commit 54d7f8c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
+ Coverage   52.34%   52.44%   +0.10%     
==========================================
  Files          97       98       +1     
  Lines       15166    15102      -64     
  Branches    15166    15102      -64     
==========================================
- Hits         7938     7920      -18     
+ Misses       6733     6686      -47     
- Partials      495      496       +1     
Files Changed Coverage Δ
curp-external-api/src/cmd.rs 27.77% <0.00%> (ø)
curp/src/client.rs 5.14% <0.00%> (-0.08%) ⬇️
curp/src/error.rs 0.00% <0.00%> (ø)
curp/src/rpc/connect.rs 21.87% <0.00%> (ø)
curp/src/rpc/mod.rs 26.94% <0.00%> (+0.27%) ⬆️
...urp/src/server/cmd_worker/conflict_checked_mpmc.rs 85.08% <0.00%> (ø)
curp/src/server/curp_node.rs 24.30% <0.00%> (+0.10%) ⬆️
xline-client/src/error.rs 0.00% <ø> (ø)
xline/src/client/errors.rs 0.00% <ø> (ø)
xline/src/server/auth_server.rs 0.00% <0.00%> (ø)
... and 14 more

... and 2 files with indirect coverage changes

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

@bsbds bsbds marked this pull request as ready for review July 26, 2023 12:14
curp-external-api/src/cmd.rs Outdated Show resolved Hide resolved
curp/src/client.rs Outdated Show resolved Hide resolved
iGxnon
iGxnon previously approved these changes Jul 28, 2023
@Phoenix500526
Copy link
Collaborator

I think this implementation is too invasive for the curp consensus. ProposeError::ExecutionError refers to errors gnenrated during the execution phase of CURP protocol. In fact, the client's command may not be turly executed during this phase. It will be executed during the after sync phase. Therefore, I don't think it's a good practice to include C::Error in ProposeError::ExecutionError. Can we instead combine the specific command's execution error and the specific command's response together? For example, distribute the ExecuteError to ER (CommandResponse) and ASR (SyncResponse)?

curp-external-api/src/cmd.rs Outdated Show resolved Hide resolved
curp-external-api/src/cmd.rs Outdated Show resolved Hide resolved
@bsbds
Copy link
Collaborator Author

bsbds commented Aug 1, 2023

I have pushed another refactored version @Phoenix500526 @rogercloud @iGxnon

curp-external-api/src/cmd.rs Outdated Show resolved Hide resolved
curp/src/client.rs Outdated Show resolved Hide resolved
curp/src/error.rs Outdated Show resolved Hide resolved
@bsbds bsbds force-pushed the refactor-error-type branch 2 times, most recently from 598c9b5 to 35925cd Compare August 3, 2023 06:08
@bsbds bsbds requested a review from iGxnon August 3, 2023 07:46
curp/src/error.rs Show resolved Hide resolved
xline/src/storage/execute_error.rs Outdated Show resolved Hide resolved
xline/src/storage/execute_error.rs Outdated Show resolved Hide resolved
Phoenix500526
Phoenix500526 previously approved these changes Aug 3, 2023
The ProposeError originally include `RpcError`, however, in the current curp code, it does not return the rpc error to user but handle the rpc error internally, there's no need to keep it in ProposeError.

Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
…and`

Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
@Phoenix500526 Phoenix500526 merged commit 6f1cff4 into xline-kv:master Aug 3, 2023
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants