Repository navigation
Probe timeout, retry jitter, safe user_message (v1.2.0) - #20
Merged
Merged
Conversation
- A half-open probe older than probe_timeout_ms (default: the reset timeout) counts as failed, so a hung probe no longer locks the breaker. Add CircuitBreaker::is_probing. - RetryExecutor::with_backoff, RetryExecutor::with_jitter and RetryPolicy::with_jitter; jitter on by default with the jitter feature. Jitter is spread below the cap and uses an in-crate generator, so rand is no longer a dependency. - Failure times in a VecDeque capped at the threshold; a panic in the closed state counts as a failure. - ForgeError::user_message defaults to the caption; add Redacted<T>; the log adapters escape control characters; forbid unsafe code. - Doc fixes: hook panics under panic = "abort", breaker counting, STABILITY panic note, stale Cargo.toml comment.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from an independent review, released as 1.2.0 (error-forge and error-forge-derive, versioned together; the derive has no code changes). No public item removed or changed; MSRV stays 1.81;
randdropped, no new dependencies.probe_timeout_ms(default: the reset timeout) counts as failed and its late result is ignored;is_probing()tells a running probe from a pending one. Failure times kept in a cappedVecDeque; a closed-state panic counts as a failure.RetryExecutor::with_backoff(impl Backoff),RetryExecutor::with_jitter,RetryPolicy::with_jitter; jitter on by default with thejitterfeature. Jitter draws below the cap instead of clamping onto it, using an in-crate generator.user_message()defaults to the caption (never the error's data);Redacted<T>; the log adapters escape control characters;#![forbid(unsafe_code)].panic = "abort", breaker counting semantics, STABILITY and Cargo.toml corrections.Regression tests:
tests/review_fixes_test.rs. CHANGELOG included.