Skip to content

Tags: cep21/circuit

Tags

v4.1.0

Toggle v4.1.0's commit message
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

v4.0.0

Toggle v4.0.0's commit message
ci: Add circuit test

v3.2.2

Toggle v3.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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>

v3.2.1

Toggle v3.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
[trivial] remove benchmark dependencies from v3 (#109)

* remove benchmark dependencies from v3

* add replace directive

v3.2.0

Toggle v3.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Zuzmic treat deadline expired as failure (#95)

* treat DeadlineExceeded as failure

* remove comment: typo alrady fixed

* add IsErrInterrupt config option

* remove mutex

* fix ordering

* circle/circuit

Co-authored-by: Kolokhanin Roman <rkolokhanin@ozon.ru>

v3.1.1

Toggle v3.1.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add license to v3 directory (#91)

* Add license to v3 directory

I think pkg.go.dev is not detecting
the license because it is in the ROOT and not in v3
directory.  Add a copy to the v3 directory as well.

* go mod only requires 1.11

v3.1.0

Toggle v3.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #78 from cep21/pr

Error: add Error type.

v3.0.1

Toggle v3.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #76 from cep21/modules

modules: tidy and fix some module corner cases

v3.0.0

Toggle v3.0.0's commit message

Unverified

This user has not yet uploaded their public signing key.
Fix misspells

v2.4.2

Toggle v2.4.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Upgrade to 1.12 and golangci-lint (#61)

* Upgrade to 1.12 and golangci-lint

* Unused gometalinter install script