Skip to content

Commit b0f5152

Browse files
authored
Merge pull request #1407 from mattrjacobs/reset-percentile-snapshot-when-advancing-all-buckets
Clear the percentile snapshot whenever all buckets get cleared
2 parents e7d23a3 + c4cd610 commit b0f5152

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixRollingPercentile.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ public void reset() {
308308

309309
// clear buckets so we start over again
310310
buckets.clear();
311+
312+
// and also make sure the percentile snapshot gets reset
313+
currentPercentileSnapshot = new PercentileSnapshot(buckets.getArray());
311314
}
312315

313316
/* package-private for testing */ static class PercentileBucketData {

0 commit comments

Comments
 (0)