Skip to content

Commit

Permalink
revert(s3stream/limiter): increase the max tokens of network limiters (
Browse files Browse the repository at this point in the history
…#2126)

This reverts commit bc63e6b.
  • Loading branch information
Chillax-0v0 authored Nov 6, 2024
1 parent e53c837 commit 08ca9ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/scala/kafka/log/stream/s3/DefaultS3Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,14 @@ public void start() {
throw new IllegalArgumentException(String.format("refillToken must be greater than 0, bandwidth: %d, refill period: %dms",
config.networkBaselineBandwidth(), config.refillPeriodMs()));
}
long maxToken = refillToken * 10;
GlobalNetworkBandwidthLimiters.instance().setup(AsyncNetworkBandwidthLimiter.Type.INBOUND,
refillToken, config.refillPeriodMs(), maxToken);
refillToken, config.refillPeriodMs(), config.networkBaselineBandwidth());
networkInboundLimiter = GlobalNetworkBandwidthLimiters.instance().get(AsyncNetworkBandwidthLimiter.Type.INBOUND);
S3StreamMetricsManager.registerNetworkAvailableBandwidthSupplier(AsyncNetworkBandwidthLimiter.Type.INBOUND, () ->
config.networkBaselineBandwidth() - (long) networkInboundRate.derive(
TimeUnit.NANOSECONDS.toSeconds(System.nanoTime()), NetworkStats.getInstance().networkInboundUsageTotal().get()));
GlobalNetworkBandwidthLimiters.instance().setup(AsyncNetworkBandwidthLimiter.Type.OUTBOUND,
refillToken, config.refillPeriodMs(), maxToken);
refillToken, config.refillPeriodMs(), config.networkBaselineBandwidth());
networkOutboundLimiter = GlobalNetworkBandwidthLimiters.instance().get(AsyncNetworkBandwidthLimiter.Type.OUTBOUND);
S3StreamMetricsManager.registerNetworkAvailableBandwidthSupplier(AsyncNetworkBandwidthLimiter.Type.OUTBOUND, () ->
config.networkBaselineBandwidth() - (long) networkOutboundRate.derive(
Expand Down

0 comments on commit 08ca9ec

Please sign in to comment.