Skip to content

Commit

Permalink
fix:fix slip expire bucket bug in circuit breaker. (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyeBeFreeman authored Sep 19, 2024
1 parent 521bdb8 commit 42c7283
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
package com.tencent.polaris.plugins.circuitbreaker.common.stat;

import com.tencent.polaris.logging.LoggerFactory;
import org.slf4j.Logger;

import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
import org.slf4j.Logger;

/**
* 时间滑窗的具体实现
Expand Down Expand Up @@ -136,7 +137,7 @@ private void slipExpireBucket(Bucket head, Bucket newBucket, long now) {
break;
}
slipCount++;
headStartTime = head.getTimeRange().getStart();
headStartTime = nextHead.getTimeRange().getStart();
headWindowEndTime = headStartTime + windowLengthMs;
}
if (null == nextHead) {
Expand Down

0 comments on commit 42c7283

Please sign in to comment.