Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
1
-
SDK35
Description
Something like:
--- a/circuitbreaker.go
|
+++ b/circuitbreaker.go
|
@@ -80,15 +80,15 @@ func (ncb *noopCircuitBreaker) CanaryTimeout() time.Duration { |
|
type lazyCircuitBreaker struct {
|
state uint32
|
- windowStart int64
|
- sleepWindow int64
|
- rollingWindow int64
|
- volumeThreshold int64
|
+ windowStart atomic.AlignedInt64
|
+ sleepWindow atomic.AlignedInt64
|
+ rollingWindow atomic.AlignedInt64
|
+ volumeThreshold atomic.AlignedInt64
|
errorPercentageThreshold float64
|
canaryTimeout time.Duration
|
- total int64
|
- failed int64
|
- openedAt int64
|
+ total atomic.AlignedInt64
|
+ failed atomic.AlignedInt64
|
+ openedAt atomic.AlignedInt64
|
sendCanaryFn func()
|
completionCallback CircuitBreakerCallback
|
}
|
|
perhaps?
Attachments
For Gerrit Dashboard: GOCBC-1338 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
179221,3 | GOCBC-1338: Update lazyCircuitBreaker to be 64 bit aligned | master | gocbcore | Status: MERGED | +2 | +1 |