Skip to content

Commit

Permalink
Merge pull request #95 from elandau/bugfix/limit_gauge
Browse files Browse the repository at this point in the history
Fix limit gauge not updating when using a PartitionedLimiter
  • Loading branch information
elandau authored Jan 12, 2019
2 parents 32a58d3 + 97e1063 commit eef9528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ private Gradient2Limit(Builder builder) {
this.minLimit = builder.minLimit;
this.queueSize = builder.queueSize;
this.smoothing = builder.smoothing;
this.shortRtt = new SingleMeasurement(); // new ExpAvgMeasurement(builder.shortWindow,10);
this.shortRtt = new SingleMeasurement();
this.longRtt = new ExpAvgMeasurement(builder.longWindow, 10);

this.longRttSampleListener = builder.registry.registerDistribution(MetricIds.MIN_RTT_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ private void releasePartition(Partition partition) {

@Override
protected void onNewLimit(int newLimit) {
super.onNewLimit(newLimit);
partitions.forEach((name, partition) -> partition.updateLimit(newLimit));
}

Expand Down

0 comments on commit eef9528

Please sign in to comment.