Tags: cep21/circuit
Tags
v4.1.0 Bug-fix release: 24 bugs fixed across the circuit state machine, rolling metrics, and configuration factories. No breaking API changes (verified with gorelease). Requires Go 1.21+. - SortedDurations.Percentile(NaN) panicked with index-out-of-range (#152) - RollingCounter.GetBuckets panicked on zero-value counter (divide by zero) (#151) - RollingCounter.UnmarshalJSON panicked on incomplete JSON; now errors (#151) - RollingCounter.UnmarshalJSON accepted inconsistent JSON (NumBuckets vs Buckets length mismatch), later GetBuckets panicked; now errors (#152) - Opener.SetConfigNotThreadSafe panicked on nil Now func (#151) - RollingBuckets.Advance panicked on zero BucketWidth (#150) - RollingPercentile.AddDuration panicked on times before StartTime (#150) - ConsecutiveErrOpenerFactory: closure captured config by reference, concurrent factory calls mutated shared state (#151) - hystrix.OpenerFactory and CloserFactory: same closure-capture bug (#150) - RollingBuckets.Advance: concurrent callers could clear the same bucket multiple times or skip clears (#150) - Circuit open/close TOCTOU: concurrent state transitions could emit Opened()/Closed() metric callbacks multiple times per transition. Now uses CAS to guarantee exactly-once (#151) - Fallback concurrency throttle read MaxConcurrentRequests twice; a config change between reads could produce inconsistent gating (#151) - Circuit.OpenCircuit used time.Now() instead of the configured TimeKeeper (#150) - Duplicate now() calls at timeout boundary could mark an on-time completion as a spurious timeout (#150) - SortedDurations.Var reported percentiles with wrong scaling (#150) - MockClock.AfterFunc with negative duration never fired (real time.AfterFunc fires immediately) (#151) - errors.IsBadRequest did not unwrap wrapped errors (now uses errors.As) (#150) - Removed unreachable branches and unused fields flagged by static analysis. - Property-based state-machine test (testing/quick + MockClock + reference model) verifies the exactly-once RunMetrics contract and Opened/Closed alternation under all interleavings (#152) - 5 Go-native fuzz targets with differential oracle for RollingCounter, RollingBuckets, SortedDurations.Percentile (#152) - Invariant-asserting concurrent stress tests that would have caught the TOCTOU bugs pre-merge (#152) - Daily scheduled fuzzing workflow (#152) - Makefile restored: make (fast loop), make ci (pre-PR gate), make fuzz, make bench, make cover (#152) Full changelog: v4.0.0...v4.1.0
Add AfterFunc configuration option to hystrix.ConfigureCloser (#111) * Add AfterFunc configuration option to hystrix.ConfigureCloser * Add AfterFunc field to ConfigureCloser Merge function * Add json tag to omit AfterFunc from json encoding Signed-off-by: Chris Guiney <chrisg@tune.com> Co-authored-by: Chris Guiney <chrisg@tune.com>
PreviousNext