-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8411778
commit cb669a3
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Summary: | ||
|
||
- Added: | ||
- [fb49efb3](https://github.com/datafuselabs/openraft/commit/fb49efb37e209ab0cd9ea7c4bc243f18f4e9a658) Add `DecomposeResult` to simplify error handling. | ||
|
||
Detail: | ||
|
||
### Added: | ||
|
||
- Added: [fb49efb3](https://github.com/datafuselabs/openraft/commit/fb49efb37e209ab0cd9ea7c4bc243f18f4e9a658) Add `DecomposeResult` to simplify error handling; by 张炎泼; 2024-06-20 | ||
|
||
This commit treats remote errors occurring during RPC, like a `Fatal` | ||
error, as an `Unreachable` error. This is due to Openraft's current | ||
inability to distinguish between an unreachable node and a broken node. | ||
|
||
- **Helper trait `DecomposeResult`:** Introduced to simplify handling | ||
composite errors. It converts a result of the | ||
form `Result<R, ErrorAOrB>` | ||
into a nested result `Result<Result<R, ErrorA>, ErrorB>`. |