Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
Signed-off-by: iGxnon <[email protected]>
  • Loading branch information
iGxnon committed Jan 3, 2024
1 parent e79270d commit f62a6d3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions curp/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,18 @@ impl CurpError {
/// The priority of curp error, indicate which error should be handled in retry layer
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]

Check warning on line 658 in curp/src/rpc/mod.rs

View check run for this annotation

Codecov / codecov/patch

curp/src/rpc/mod.rs#L658

Added line #L658 was not covered by tests
pub(crate) enum CurpErrorPriority {
/// Low priority
/// Low priority, in multiple sequenced RPCs, if preceding RPCs returns
/// a low-priority error, will not exit prematurely. In concurrent RPCs,
/// a low-priority error returned may be overridden by a higher-priority error.
Low = 1,
/// High priority
/// High priority, in multiple sequenced RPCs, if preceding RPCs returns
/// a high-priority error, it will exit early, preventing next RPCs from
/// proceeding. In concurrent RPCs, high-priority errors will override
/// low-priority errors.
High = 2,
/// Should be returned immediately if any server response it
/// Should be returned immediately if any server response it. If requests are
/// sent to multiple servers, the request that does not have received a
/// response will be terminated immediately.
ReturnImmediately = 3,
}

Expand Down

0 comments on commit f62a6d3

Please sign in to comment.