From 155a6c0fac195e881b533f69ca5bd7fdf951a4fc Mon Sep 17 00:00:00 2001 From: Shichao Nie Date: Sun, 24 Mar 2024 11:01:45 +0800 Subject: [PATCH] fix(s3stream): temporarily disable throttle for slow read (#1009) Signed-off-by: Shichao Nie --- s3stream/src/main/java/com/automq/stream/s3/ObjectReader.java | 2 +- s3stream/src/main/java/com/automq/stream/s3/S3Stream.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/s3stream/src/main/java/com/automq/stream/s3/ObjectReader.java b/s3stream/src/main/java/com/automq/stream/s3/ObjectReader.java index d5441408a0..6e0aec98e4 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/ObjectReader.java +++ b/s3stream/src/main/java/com/automq/stream/s3/ObjectReader.java @@ -65,7 +65,7 @@ public CompletableFuture find(long streamId, long startOffset, } public CompletableFuture read(DataBlockIndex block) { - CompletableFuture rangeReadCf = s3Operator.rangeRead(objectKey, block.startPosition(), block.endPosition(), ThrottleStrategy.THROTTLE_1); + CompletableFuture rangeReadCf = s3Operator.rangeRead(objectKey, block.startPosition(), block.endPosition(), ThrottleStrategy.BYPASS); return rangeReadCf.thenApply(DataBlockGroup::new); } diff --git a/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java b/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java index a4c0c3dd09..db31f0ed31 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java +++ b/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java @@ -197,7 +197,7 @@ public CompletableFuture fetch(FetchContext context, if (context.readOptions().fastRead()) { networkOutboundLimiter.forceConsume(totalSize); } else { - return networkOutboundLimiter.consume(ThrottleStrategy.THROTTLE_1, totalSize).thenApply(nil -> rs); + return networkOutboundLimiter.consume(ThrottleStrategy.BYPASS, totalSize).thenApply(nil -> rs); } } return CompletableFuture.completedFuture(rs);