Skip to content

Commit 4767274

Browse files
committed
feature:自适应重试控制策略
1 parent 3028ec4 commit 4767274

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

retry/adaptive.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,6 @@ func (s *AdaptiveTimeoutRetryStrategy) Report(err error) Strategy {
5151
return s
5252
}
5353

54-
//func (s *AdaptiveTimeoutRetryStrategy) Next(ctx context.Context, err error) (time.Duration, bool) {
55-
// if err == nil {
56-
// s.markSuccess()
57-
// return 0, false
58-
// }
59-
// failCount := s.getFailed()
60-
// s.markFail()
61-
// if failCount >= s.threshold {
62-
// return 0, false
63-
// }
64-
// return s.strategy.Next(ctx, err)
65-
//}
66-
6754
func (s *AdaptiveTimeoutRetryStrategy) markSuccess() {
6855
count := atomic.AddUint64(&s.reqCount, 1)
6956
count = count % (uint64(64) * uint64(len(s.ringBuffer)))

0 commit comments

Comments
 (0)